<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/dev/streams, branch release/7.2.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.2.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.2.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2009-05-01T02:51:58Z</updated>
<entry>
<title>Copy releng/7.2 to release/7.2.0 for FreeBSD 7.2-RELEASE.</title>
<updated>2009-05-01T02:51:58Z</updated>
<author>
<name>Ken Smith</name>
<email>kensmith@FreeBSD.org</email>
</author>
<published>2009-05-01T02:51:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b205d83df7763ca1f099bce5ac12a05862a626c4'/>
<id>urn:sha1:b205d83df7763ca1f099bce5ac12a05862a626c4</id>
<content type='text'>
Approved by:	re (implicit)

This commit was manufactured to restore the state of the 7.2-RELEASE image.
</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>
<entry>
<title>Remove unnecessary locking for td_dupfd (it requires no locks).</title>
<updated>2006-07-18T22:31:33Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2006-07-18T22:31:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=0c6d6356bab47061765c0f24d769afe069d9e94b'/>
<id>urn:sha1:0c6d6356bab47061765c0f24d769afe069d9e94b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use kern_open() directly rather than a stackgap detour via open().</title>
<updated>2005-02-07T18:22:20Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-02-07T18:22:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=777a3021d37dc26d95b152432808ae2988e82da3'/>
<id>urn:sha1:777a3021d37dc26d95b152432808ae2988e82da3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Start each of the license/copyright comments with /*-, minor shuffle of lines</title>
<updated>2005-01-06T01:43:34Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2005-01-06T01:43:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=098ca2bda93c701c5331d4e6aace072495b4caaa'/>
<id>urn:sha1:098ca2bda93c701c5331d4e6aace072495b4caaa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.</title>
<updated>2004-11-13T11:53:02Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2004-11-13T11:53:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=124e4c3be8dae63a1024352685e1c2b9e64a8312'/>
<id>urn:sha1:124e4c3be8dae63a1024352685e1c2b9e64a8312</id>
<content type='text'>
Use this in all the places where sleeping with the lock held is not
an issue.

The distinction will become significant once we finalize the exact
lock-type to use for this kind of case.
</content>
</entry>
</feed>
