<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/dev/streams, branch release/8.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.0.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.0.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2009-11-21T06:13:29Z</updated>
<entry>
<title>Create release/8.0.0 for the 8.0-RELEASE.</title>
<updated>2009-11-21T06:13:29Z</updated>
<author>
<name>Ken Smith</name>
<email>kensmith@FreeBSD.org</email>
</author>
<published>2009-11-21T06:13:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a4d3b78df842614c46b116fc5a6f470be637dccd'/>
<id>urn:sha1:a4d3b78df842614c46b116fc5a6f470be637dccd</id>
<content type='text'>
Approved by:	re (implicit)

This commit was manufactured to restore the state of the 8.0-RELEASE image.
</content>
</entry>
<entry>
<title>The streams ptm code is pretty awful and likely incorrect. I don't know</title>
<updated>2009-02-16T20:12:28Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-02-16T20:12:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=55272bd6b4c51c0df32593f43cef85d475ebe47a'/>
<id>urn:sha1:55272bd6b4c51c0df32593f43cef85d475ebe47a</id>
<content type='text'>
anything about streams, so I'm not going to fix it. Just a small comment
to redirect folks to posix_openpt().
</content>
</entry>
<entry>
<title>Replace all calls to minor() with dev2unit().</title>
<updated>2008-09-27T08:51:18Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-09-27T08:51:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6bfa9a2d66dd0e00182017d6741d44e54d0b2cca'/>
<id>urn:sha1:6bfa9a2d66dd0e00182017d6741d44e54d0b2cca</id>
<content type='text'>
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
</content>
</entry>
<entry>
<title>Make ftruncate a 'struct file' operation rather than a vnode operation.</title>
<updated>2008-01-07T20:05:19Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2008-01-07T20:05:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e46502943ac1471d7e3718557de87b17265985fe'/>
<id>urn:sha1:e46502943ac1471d7e3718557de87b17265985fe</id>
<content type='text'>
This makes it possible to support ftruncate() on non-vnode file types in
the future.
- 'struct fileops' grows a 'fo_truncate' method to handle an ftruncate() on
  a given file descriptor.
- ftruncate() moves to kern/sys_generic.c and now just fetches a file
  object and invokes fo_truncate().
- The vnode-specific portions of ftruncate() move to vn_truncate() in
  vfs_vnops.c which implements fo_truncate() for vnode file types.
- Non-vnode file types return EINVAL in their fo_truncate() method.

Submitted by:	rwatson
</content>
</entry>
<entry>
<title>Remove explicit locking of struct file.</title>
<updated>2007-12-30T01:42:15Z</updated>
<author>
<name>Jeff Roberson</name>
<email>jeff@FreeBSD.org</email>
</author>
<published>2007-12-30T01:42:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=397c19d1753d210247d77eb3ca33d1c7c1eb2fa9'/>
<id>urn:sha1:397c19d1753d210247d77eb3ca33d1c7c1eb2fa9</id>
<content type='text'>
 - Introduce a finit() which is used to initailize the fields of struct file
   in such a way that the ops vector is only valid after the data, type,
   and flags are valid.
 - Protect f_flag and f_count with atomic operations.
 - Remove the global list of all files and associated accounting.
 - Rewrite the unp garbage collection such that it no longer requires
   the global list of all files and instead uses a list of all unp sockets.
 - Mark sockets in the accept queue so we don't incorrectly gc them.

Tested by:	kris, pho
</content>
</entry>
<entry>
<title>Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which</title>
<updated>2007-08-06T14:26:03Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2007-08-06T14:26:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=0bf686c1257e2e7944a4cee9d9d628280facaa3d'/>
<id>urn:sha1:0bf686c1257e2e7944a4cee9d9d628280facaa3d</id>
<content type='text'>
previously conditionally acquired Giant based on debug.mpsafenet.  As that
has now been removed, they are no longer required.  Removing them
significantly simplifies error-handling in the socket layer, eliminated
quite a bit of unwinding of locking in error cases.

While here clean up the now unneeded opt_net.h, which previously was used
for the NET_WITH_GIANT kernel option.  Clean up some related gotos for
consistency.

Reviewed by:	bz, csjp
Tested by:	kris
Approved by:	re (kensmith)
</content>
</entry>
<entry>
<title>Replace custom file descriptor array sleep lock constructed using a mutex</title>
<updated>2007-04-04T09:11:34Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2007-04-04T09:11:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=5e3f7694b189584ae30219566fcc6c4c3d059305'/>
<id>urn:sha1:5e3f7694b189584ae30219566fcc6c4c3d059305</id>
<content type='text'>
and flags with an sxlock.  This leads to a significant and measurable
performance improvement as a result of access to shared locking for
frequent lookup operations, reduced general overhead, and reduced overhead
in the event of contention.  All of these are imported for threaded
applications where simultaneous access to a shared file descriptor array
occurs frequently.  Kris has reported 2x-4x transaction rate improvements
on 8-core MySQL benchmarks; smaller improvements can be expected for many
workloads as a result of reduced overhead.

- Generally eliminate the distinction between "fast" and regular
  acquisisition of the filedesc lock; the plan is that they will now all
  be fast.  Change all locking instances to either shared or exclusive
  locks.

- Correct a bug (pointed out by kib) in fdfree() where previously msleep()
  was called without the mutex held; sx_sleep() is now always called with
  the sxlock held exclusively.

- Universally hold the struct file lock over changes to struct file,
  rather than the filedesc lock or no lock.  Always update the f_ops
  field last. A further memory barrier is required here in the future
  (discussed with jhb).

- Improve locking and reference management in linux_at(), which fails to
  properly acquire vnode references before using vnode pointers.  Annotate
  improper use of vn_fullpath(), which will be replaced at a future date.

In fcntl(), we conservatively acquire an exclusive lock, even though in
some cases a shared lock may be sufficient, which should be revisited.
The dropping of the filedesc lock in fdgrowtable() is no longer required
as the sxlock can be held over the sleep operation; we should consider
removing that (pointed out by attilio).

Tested by:	kris
Discussed with:	jhb, kris, attilio, jeff
</content>
</entry>
<entry>
<title>Clean up the svr4 socket cache and streams code some to make it more easily</title>
<updated>2006-07-21T20:40:13Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2006-07-21T20:40:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e0569c07986ca74bdd4f644f501091ecfb9bfc47'/>
<id>urn:sha1:e0569c07986ca74bdd4f644f501091ecfb9bfc47</id>
<content type='text'>
locked.
- Move all the svr4 socket cache code into svr4_socket.c, specifically
  move svr4_delete_socket() over from streams.c.  Make the socket cache
  entry structure and svr4_head private to svr4_socket.c as a result.
- Add a mutex to protect the svr4 socket cache.
- Change svr4_find_socket() to copy the sockaddr_un struct into a
  caller-supplied sockaddr_un rather than giving the caller a pointer to
  our internal one.  This removes the one case where code outside of
  svr4_socket.c could access data in the cache.
- Add an eventhandler for process_exit and process_exec to purge the cache
  of any entries for the exiting or execing process.
- Add methods to init and destroy the socket cache and call them from the
  svr4 ABI module's event handler.
- Conditionally grab Giant around socreate() in streamsopen().
- Use fdclose() instead of inlining it in streamsopen() when handling
  socreate() failure.
- Only allocate a stream structure and attach it to a socket in
  streamsopen().  Previously, if a svr4 program performed a stream
  operation on an arbitrary socket not opened via the streams device,
  we would attach streams state data to it and change f_ops of the
  associated struct file while it was in use.  The latter was especially
  not safe, and if a program wants a stream object it should open it via
  the streams device anyway.
- Don't bother locking so_emuldata in the streams code now that we only
  touch it right after creating a socket (in streamsopen()) or when
  tearing it down when the file is closed.
- Remove D_NEEDGIANT from the streams device as it is no longer needed.
</content>
</entry>
<entry>
<title>Whitespace fix after s/dev_t/struct cdev */.</title>
<updated>2006-07-19T18:52:33Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2006-07-19T18:52:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=9c2dc1146568832a161ae1ee851cb3149a5e5938'/>
<id>urn:sha1:9c2dc1146568832a161ae1ee851cb3149a5e5938</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initialize svr4_head during MOD_LOAD rather than on demand.</title>
<updated>2006-07-19T18:26:09Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2006-07-19T18:26:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a02f5c6204e79d0a717f20b6076be78de39617ee'/>
<id>urn:sha1:a02f5c6204e79d0a717f20b6076be78de39617ee</id>
<content type='text'>
</content>
</entry>
</feed>
