freebsd with flexible iflib nic queues
Go to file
Alfred Perlstein 85f190e4d1 Fixes to make select/poll mpsafe.
Problem:
  selwakeup required calling pfind which would cause lock order
  reversals with the allproc_lock and the per-process filedesc lock.
Solution:
  Instead of recording the pid of the select()'ing process into the
  selinfo structure, actually record a pointer to the thread.  To
  avoid dereferencing a bad address all the selinfo structures that
  are in use by a thread are kept in a list hung off the thread
  (protected by sellock).  When a selwakeup occurs the selinfo is
  removed from that threads list, it is also removed on the way out
  of select or poll where the thread will traverse its list removing
  all the selinfos from its own list.

Problem:
  Previously the PROC_LOCK was used to provide the mutual exclusion
  needed to ensure proper locking, this couldn't work because there
  was a single condvar used for select and poll and condvars can
  only be used with a single mutex.
Solution:
  Introduce a global mutex 'sellock' which is used to provide mutual
  exclusion when recording events to wait on as well as performing
  notification when an event occurs.

Interesting note:
  schedlock is required to manipulate the per-thread TDF_SELECT
  flag, however if given its own field it would not need schedlock,
  also because TDF_SELECT is only manipulated under sellock one
  doesn't actually use schedlock for syncronization, only to protect
  against corruption.

Proc locks are no longer used in select/poll.

Portions contributed by: davidc
2002-03-14 01:32:30 +00:00
bin 1) Rev.1.35 of dd.c has a more serious regression. It backs out rev.1.31, 2002-03-07 14:00:33 +00:00
contrib Add note about genscripts.sh. 2002-03-13 07:16:00 +00:00
crypto Update version string. 2002-03-07 14:36:28 +00:00
etc Allow LOMAC to be loaded as part of the boot scripts using "lomac_enable" 2002-03-12 21:47:31 +00:00
games Assorted mechanical fixes. 2002-03-09 04:38:25 +00:00
gnu Support linking with -z combreloc (combine and sort reloc sections) and with 2002-03-13 18:26:59 +00:00
include Tokens after #endif are not strict ISO. 2002-03-13 10:29:06 +00:00
kerberos5 Fix build when MAKE_KERBEROS4 is not requested. This was broken with 2002-02-21 15:54:20 +00:00
kerberosIV Install script via SCRIPTS. 2001-12-17 16:52:32 +00:00
lib Remove some files we don't want. 2002-03-11 22:53:27 +00:00
libexec rtld support for sparc64. 2002-03-13 02:40:39 +00:00
release Add a warning that URLs in this document are subject to change (in 2002-03-14 01:29:31 +00:00
sbin Clarify the cylinder > 1023 issue, now that EDD support is automatic. 2002-03-13 19:00:19 +00:00
secure No functional change, but big code cleanup. WARNS, lint(1) and style(9). 2002-03-06 17:18:09 +00:00
share Fix syntax error. 2002-03-13 18:37:40 +00:00
sys Fixes to make select/poll mpsafe. 2002-03-14 01:32:30 +00:00
tools Add a tool that I've written to help with finding what other 2002-02-28 20:12:52 +00:00
usr.bin Add encounter between Flinders and Baudin. 2002-03-13 07:57:24 +00:00
usr.sbin Use the return value from snprintf() to keep a track of the length of 2002-03-13 10:21:19 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Makefile.inc0 is no longer used. 2002-03-03 22:37:35 +00:00
Makefile.inc1 1-true-AWK has a build-tool target. 2002-03-06 08:24:32 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README Slightly improve the description of "crypto". "DES" is a subset of 2000-08-31 17:59:01 +00:00
UPDATING PLASTER A WARNING THAT TELLS PEOPLE THAT CURRENT HAS DEBUGGING FEATURES 2002-02-28 05:31:02 +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
``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/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 have to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/i386/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.

kerberosIV	Kerberos package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

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/handbook/synching.html