freebsd kernel with SKQ
Go to file
Konstantin Belousov d9e9650a36 Allow shared lookups for nullfs mounts, if lower filesystem supports
it.  There are two problems which shall be addressed for shared
lookups use to have measurable effect on nullfs scalability:

1. When vfs_lookup() calls VOP_LOOKUP() for nullfs, which passes lookup
operation to lower fs, resulting vnode is often only shared-locked. Then
null_nodeget() cannot instantiate covering vnode for lower vnode, since
insmntque1() and null_hashins() require exclusive lock on the lower.

Change the assert that lower vnode is exclusively locked to only
require any lock.  If null hash failed to find pre-existing nullfs
vnode for lower vnode and the vnode is shared-locked, the lower vnode
lock is upgraded.

2. Nullfs reclaims its vnodes on deactivation. This is due to nullfs
inability to detect reclamation of the lower vnode.  Reclamation of a
nullfs vnode at deactivation time prevents a reference to the lower
vnode to become stale.

Change nullfs VOP_INACTIVE to not reclaim the vnode, instead use the
VFS_RECLAIM_LOWERVP to get notification and reclaim upper vnode
together with the reclamation of the lower vnode.

Note that nullfs reclamation procedure calls vput() on the lowervp
vnode, temporary unlocking the vnode being reclaimed. This seems to be
fine for MPSAFE filesystems, but not-MPSAFE code often put partially
initialized vnode on some globally visible list, and later can decide
that half-constructed vnode is not needed.  If nullfs mount is created
above such filesystem, then other threads might catch such not
properly initialized vnode. Instead of trying to overcome this case,
e.g. by recursing the lower vnode lock in null_reclaim_lowervp(), I
decided to rely on nearby removal of the support for non-MPSAFE
filesystems.

In collaboration with:	pho
MFC after:	3 weeks
2012-09-09 19:20:23 +00:00
bin sh: Remove XXX comment about removing nextopt(). 2012-09-08 19:24:03 +00:00
cddl Remove trailing whitespace. 2012-09-06 19:26:59 +00:00
contrib For UDP transport set IP_RECVDSTADDR sockopt on the socket, and provide 2012-09-09 09:46:48 +00:00
crypto Upgrade OpenSSH to 6.1p1. 2012-09-03 16:51:41 +00:00
etc Add a configtest command. 2012-09-04 21:56:16 +00:00
games Add a couple of nice quotes from Edward Everett Hale 2012-07-29 01:01:35 +00:00
gnu For building libstdc++ and libsupc++, filter out any -stdlib=libc++ 2012-08-25 23:08:24 +00:00
include Revert r240060: (Partial) 2012-09-02 22:23:23 +00:00
kerberos5 Centralize the specification of the krb5 build tools. 2012-06-01 21:26:28 +00:00
lib When calling the C++ demangler, make sure to free the returned buffer, 2012-09-07 02:38:07 +00:00
libexec 1. Use install -d to create the entropy_dir if missing so that we can do it 2012-09-04 16:00:51 +00:00
release Rework all non-contributed files that use `struct timezone'. 2012-09-01 14:45:15 +00:00
rescue Partial MFV (illumos-gate 13753:2aba784c276b) 2012-07-30 23:14:24 +00:00
sbin Rework all non-contributed files that use `struct timezone'. 2012-09-01 14:45:15 +00:00
secure Upgrade OpenSSH to 6.1p1. 2012-09-03 16:51:41 +00:00
share Minor English grammar fixes. 2012-09-09 01:22:32 +00:00
sys Allow shared lookups for nullfs mounts, if lower filesystem supports 2012-09-09 19:20:23 +00:00
tools Add a '-s <timeout>' option which will display live rate control 2012-09-08 01:14:13 +00:00
usr.bin Document -quit, four and a half years after it was implemented. 2012-09-09 13:18:13 +00:00
usr.sbin mdoc fixes. 2012-09-08 08:46:43 +00:00
COPYRIGHT Happy 2012 to FreeBSD users in Samoa. 2011-12-31 04:38:04 +00:00
LOCKS
MAINTAINERS Add isci(4) driver for amd64 and i386 targets. 2012-01-31 19:38:18 +00:00
Makefile Merging of projects/armv6, part 3 2012-08-15 03:21:56 +00:00
Makefile.inc1 Fix 'distributeworld' target when WITHOUT_GAMES is set. 2012-09-03 18:17:21 +00:00
ObsoleteFiles.inc Add removed if_pflow.h. 2012-09-09 08:14:47 +00:00
README Add the cddl/ directory. 2010-11-14 11:32:56 +00:00
UPDATING Merge the projects/pf/head branch, that was worked on for last six months, 2012-09-08 06:41: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.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

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