1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Robert Watson 4795b82c13 Coalesce pipe allocations and frees. Previously, the pipe code
would allocate two 'struct pipe's from the pipe zone, and malloc a
mutex.

- Create a new "struct pipepair" object holding the two 'struct
  pipe' instances, struct mutex, and struct label reference.  Pipe
  structures now have a back-pointer to the pipe pair, and a
  'pipe_present' flag to indicate whether the half has been
  closed.

- Perform mutex init/destroy in zone init/destroy, avoiding
  reallocating the mutex for each pipe.  Perform most pipe structure
  setup in zone constructor.

- VM memory mappings for pageable buffers are still done outside of
  the UMA zone.

- Change MAC API to speak 'struct pipepair' instead of 'struct pipe',
  update many policies.  MAC labels are also handled outside of the
  UMA zone for now.  Label-only policy modules don't have to be
  recompiled, but if a module is recompiled, its pipe entry points
  will need to be updated.  If a module actually reached into the
  pipe structures (unlikely), that would also need to be modified.

These changes substantially simplify failure handling in the pipe
code as there are many fewer possible failure modes.

On half-close, pipes no longer free the 'struct pipe' for the closed
half until a full-close takes place.  However, VM mapped buffers
are still released on half-close.

Some code refactoring is now possible to clean up some of the back
references, etc; this patch attempts not to change the structure
of most of the pipe implementation, only allocation/free code
paths, so as to avoid introducing bugs (hopefully).

This cuts about 8%-9% off the cost of sequential pipe allocation
and free in system call tests on UP and SMP in my micro-benchmarks.
May or may not make a difference in macro-benchmarks, but doing
less work is good.

Reviewed by:	juli, tjr
Testing help:	dwhite, fenestro, scottl, et al
2004-02-01 05:56:51 +00:00
bin Use sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3 2004-01-28 19:04:14 +00:00
contrib Make gcc -pthread link to -lpthread instead of -lc_r. 2004-01-30 12:14:19 +00:00
crypto Update the "overview of FreeBSD changes to OpenSSH-portable" to reflect 2004-01-25 13:09:56 +00:00
etc Latest version of this file from InterNIC. This version updates the IP 2004-01-29 16:24:30 +00:00
games "The Aged Aged Man" was not a word doubling. 2004-01-19 21:22:21 +00:00
gnu Catch up with the 20040130 src/UPDATING entry, and spell libpthread 2004-01-31 09:41:05 +00:00
include Add NO_BLUETOOTH knob to the build process 2004-01-28 00:42:51 +00:00
kerberos5 Overhaul of kerberos5/ makefiles. Most significant changes are: 2004-01-31 08:15:57 +00:00
lib Merge vfscanf.c,v 1.35. 2004-01-31 23:18:53 +00:00
libexec add missing setusershell() calls. 2004-01-18 21:29:33 +00:00
release Move recent devfs path rules note from userland section to kernel 2004-01-30 18:29:14 +00:00
rescue Revision 1.7 of this file added information 2004-01-18 22:24:23 +00:00
sbin Use memcpy plus a manual NUL termination when copying the interface name 2004-01-31 22:59:03 +00:00
secure Added two utility targets "secure" and "insecure", analogous to 2004-01-18 07:44:53 +00:00
share Clarify more about LC_*/LANG priorities. 2004-01-31 23:29:20 +00:00
sys Coalesce pipe allocations and frees. Previously, the pipe code 2004-02-01 05:56:51 +00:00
tools Use uname -n as default for the HOSTNAME configuration variable. 2004-02-01 04:51:25 +00:00
usr.bin Remove the inadvertant HTML additions to this man page. 2004-01-28 18:51:24 +00:00
usr.sbin Move the checks for whether or not to build pppctl to 2004-01-31 22:18:09 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
MAINTAINERS I'll continue to babysit the Kerberos-related stuff. 2004-01-30 15:40:33 +00:00
Makefile Put on some factor 30+ bikeshed repellent and export the internal 2003-12-09 02:08:19 +00:00
Makefile.inc1 Overhaul of kerberos5/ makefiles. Most significant changes are: 2004-01-31 08:15:57 +00:00
README
UPDATING Add a note about the libkse -> libpthread switch. 2004-01-30 12:24:21 +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/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.

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