freebsd with flexible iflib nic queues
Go to file
Robert Watson 5e3f7694b1 Replace custom file descriptor array sleep lock constructed using a mutex
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
2007-04-04 09:11:34 +00:00
bin Build updates for tcsh-6.15.00 import. 2007-03-11 22:41:19 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r168305, 2007-04-03 15:51:53 +00:00
crypto - Bring upgrade produce up-to-date for OpenSSL 0.9.8e. 2007-03-15 21:06:48 +00:00
etc Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocal 2007-04-02 22:53:07 +00:00
games Line wrap previous entry 2007-03-30 04:31:53 +00:00
gnu Minor Makefile cleanup. Do not use Makefile variables named 'version' and 2007-03-12 00:28:06 +00:00
include Update the dump program to save extended attributes. Update 2007-02-26 08:15:56 +00:00
kerberos5 Kerberos/Heimdal doesn't really depend on the INET6 macro. 2006-07-28 06:33:27 +00:00
lib Cast away const qualifier to squash GCC warning. 2007-04-04 03:29:02 +00:00
libexec Prepare rtld for symbol versioning. Disable it by default for now. 2007-04-03 19:01:06 +00:00
release Reflect netcat and bzip2 updates. 2007-03-28 08:13:23 +00:00
rescue Replace the GNU gzip with a slightly modified NetBSD gzip. The 2007-01-26 10:19:08 +00:00
sbin - Protect against specifing journal less than 100MB and against journal 2007-04-03 15:29:16 +00:00
secure Upgrade to OpenSSL 0.9.8e. 2007-03-15 20:15:15 +00:00
share Add myself. 2007-04-04 07:30:34 +00:00
sys Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
tools Fix a fd leak in socketpair(): 2007-04-02 19:15:47 +00:00
usr.bin Add test to confirm that piping a tar archive created by bsdtar through 2007-04-04 03:12:15 +00:00
usr.sbin Add the "-p" option, which allows to specify a port which the daemon 2007-04-03 21:15:00 +00:00
COPYRIGHT Welcome to 2007 2006-12-31 16:35:29 +00:00
LOCKS Document commit constraints for RELENG_6_*. 2006-01-13 06:51:43 +00:00
MAINTAINERS Request pre-commit review of BSD.{local,x11*}.dist by portmgr, since these 2006-11-11 22:24:10 +00:00
Makefile Introduce a variable TARGETS that can be set on the make command line 2007-04-02 21:32:44 +00:00
Makefile.inc1 Enable ncurses wide character support 2007-03-09 12:11:58 +00:00
ObsoleteFiles.inc Update for bzip2 1.0.4 import: bzip2.info.gz gone. 2007-03-28 07:49:57 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING Make the tunable names for Intel license agreement more obvious. 2007-04-03 10:04:54 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html