OPNsense - FreeBSD source
Find a file
David Schultz b3fed13e9d Close a race in swapoff(). Here are the gory details:
In order to avoid livelock, swapoff() skips over objects with a
  nonzero pip count and makes another pass if necessary.  Since it is
  impossible to know which objects we care about, it would choose an
  arbitrary object with a nonzero pip count and wait for it before
  making another pass, the theory being that this object would finish
  paging about as quickly as the ones we care about.  Unfortunately,
  we may have slept since we acquired a reference to this object.
  Hack around this problem by tsleep()ing on the pointer anyway, but
  timeout after a fixed interval.  More elegant solutions are possible,
  but the ones I considered unnecessarily complicate this rare case.

Also, kill some nits that seem to have crept into the swapoff() code
in the last 75 revisions or so:

- Don't pass both sp and sp->sw_used to swap_pager_swapoff(), since
  the latter can be derived from the former.

- Replace swp_pager_find_dev() with something simpler.  There's no
  need to iterate over the entire list of swap devices just to determine
  if a given block is assigned to the one we're interested in.

- Expand the scope of the swhash_mtx in a couple of places so that it
  isn't released and reacquired once for every hash bucket.

- Don't drop the swhash_mtx while holding a reference to an object.
  We need to lock the object first.  Unfortunately, doing so would
  violate the established lock order, so use VM_OBJECT_TRYLOCK() and
  try again on a subsequent pass if the object is already locked.

- Refactor swp_pager_force_pagein() and swap_pager_swapoff() a bit.
2004-11-05 05:36:56 +00:00
bin Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
contrib Fix some more files that got butchered to appear to be back on the 2004-10-21 20:10:14 +00:00
crypto Better Xlist command line. 2004-10-28 16:13:28 +00:00
etc Sync up with vinum(8) and rc.d/vinum removal. 2004-11-04 13:33:29 +00:00
games Never be afraid to try something new. Remember, amateurs built the ark. 2004-10-27 20:28:56 +00:00
gnu For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
include For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
kerberos5 Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
lib Remove the unused archive_string_sprintf() utility function. 2004-11-05 05:32:04 +00:00
libexec Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
release Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
rescue Remove references to NO_VINUM 2004-11-04 12:57:40 +00:00
sbin Grammatical and spelling improvements. 2004-11-04 19:12:43 +00:00
secure Update for OpenSSH 3.9p1. 2004-10-28 16:04:23 +00:00
share Sync up with gdbinit.vinum removal. 2004-11-04 14:47:15 +00:00
sys Close a race in swapoff(). Here are the gory details: 2004-11-05 05:36:56 +00:00
tools Remove vinum bits. 2004-11-04 13:34:06 +00:00
usr.bin Add support for following more than one file i.e. 2004-11-04 19:18:19 +00:00
usr.sbin Protect against local flooder of /var/run/log. Do not loop forever in 2004-11-04 23:09:57 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
installworld_newk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
installworld_oldk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
MAINTAINERS Remove vinum from the list. I no longer have the time and energy to 2004-09-08 02:08:33 +00:00
Makefile Fixed MAKEOBJDIRPREFIX variable type check in case the env(1) 2004-10-18 17:47:31 +00:00
Makefile.inc1 For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Remove RFC1644 T/TCP support from the TCP side of the network stack. 2004-11-02 22:22:22 +00:00
UPDATING.64BTT Add a tip for people who are using database-related ports on a sparc64 2004-03-17 01:59:47 +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