freebsd with flexible iflib nic queues
Go to file
Alan Cox 8f0d5d3b9f When I pushed down the page queues lock into pmap_is_modified(), I created
an ordering dependence: A pmap operation that clears PG_WRITEABLE and calls
vm_page_dirty() must perform the call first.  Otherwise, pmap_is_modified()
could return FALSE without acquiring the page queues lock because the page
is not (currently) writeable, and the caller to pmap_is_modified() might
believe that the page's dirty field is clear because it has not seen the
effect of the vm_page_dirty() call.

When I pushed down the page queues lock into pmap_is_modified(), I
overlooked one place where this ordering dependence is violated:
pmap_enter().  In a rare situation pmap_enter() can be called to replace a
dirty mapping to one page with a mapping to another page.  (I say rare
because replacements generally occur as a result of a copy-on-write fault,
and so the old page is not dirty.)  This change delays clearing PG_WRITEABLE
until after vm_page_dirty() has been called.

Fixing the ordering dependency also makes it easy to introduce a small
optimization: When pmap_enter() used to replace a mapping to one page with a
mapping to another page, it freed the pv entry for the first mapping and
later called the pv entry allocator for the new mapping.  Now, pmap_enter()
attempts to recycle the old pv entry, saving two calls to the pv entry
allocator.

There is no point in setting PG_WRITEABLE on unmanaged pages, so don't.
Update a comment to reflect this.

Tidy up the variable declarations at the start of pmap_enter().
2010-05-29 17:10:45 +00:00
bin sh: Recognize "--" in . and exec. 2010-05-28 22:40:24 +00:00
cddl Fix zfs receive temporarily changing unchanged stream properties. 2010-05-23 21:02:43 +00:00
contrib Fixes from NetBSD for nvi visual mode: 2010-05-28 09:30:13 +00:00
crypto Fix .Dd line: FreeBSD's mdoc code doesn't understand OpenBSD's $Mdocdate$. 2010-05-28 01:06:40 +00:00
etc Add a new build option, MAN_UTILS. This option lets you control building 2010-05-19 23:56:26 +00:00
games Sync fortunes with other *BSDs 2010-03-31 18:21:25 +00:00
gnu Correct dtc version header autogen location. 2010-05-25 13:27:55 +00:00
include Move realpath(3) prototype to a POSIX section. 2010-04-21 16:38:37 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib mdoc: Use mdoc macro for the (R) symbol 2010-05-27 13:56:33 +00:00
libexec Only use the cache after the early stage of loading. This is 2010-05-18 08:55:23 +00:00
release The EFI system partition used to make the CD image bootable is running 2010-05-28 17:50:35 +00:00
rescue Enable liblzma support in libarchive 2010-05-10 15:28:44 +00:00
sbin mdoc: .Ud has attitude, it takes no argument! 2010-05-27 13:56:40 +00:00
secure Regenerate manual pages for OpenSSL 0.9.8n. 2010-04-01 15:37:38 +00:00
share mdoc: remove duplicate width argument 2010-05-27 13:56:47 +00:00
sys When I pushed down the page queues lock into pmap_is_modified(), I created 2010-05-29 17:10:45 +00:00
tools sh: Recognize "--" in . and exec. 2010-05-28 22:40:24 +00:00
usr.bin mail(1) misses addresses when replying to all 2010-05-27 12:59:49 +00:00
usr.sbin mdoc: use mdoc spelling of Umlauts 2010-05-27 13:56:53 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile For those of us mere mortals who do not aspire to the lofty heights 2010-03-18 18:58:17 +00:00
Makefile.inc1 Revert r208353. It did not work as I expected because WITHOUT_MAN is set 2010-05-20 20:15:56 +00:00
ObsoleteFiles.inc - Add versioned symbols to liblzma 2010-05-14 20:40:37 +00:00
README
UPDATING Note 8.0-RELEASE. 2010-05-12 21:20:04 +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