freebsd kernel with SKQ
Go to file
Poul-Henning Kamp b15a966ec6 1. Add a {pointer, v_id} pair to the vnode to store the reference to the
".." vnode.  This is cheaper storagewise than keeping it in the
    namecache, and it makes more sense since it's a 1:1 mapping.

2.  Also handle the case of "." more intelligently rather than stuff
    the namecache with pointless entries.

3.  Add two lists to the vnode and hang namecache entries which go from
    or to this vnode.  When cleaning a vnode, delete all namecache
    entries it invalidates.

4.  Never reuse namecache enties, malloc new ones when we need it, free
    old ones when they die.  No longer a hard limit on how many we can
    have.

5.  Remove the upper limit on namelength of namecache entries.

6.  Make a global list for negative namecache entries, limit their number
    to a sysctl'able (debug.ncnegfactor) fraction of the total namecache.
    Currently the default fraction is 1/16th.  (Suggestions for better
    default wanted!)

7.  Assign v_id correctly in the face of 32bit rollover.

8.  Remove the LRU list for namecache entries, not needed.  Remove the
    #ifdef NCH_STATISTICS stuff, it's not needed either.

9.  Use the vnode freelist as a true LRU list, also for namecache accesses.

10. Reuse vnodes more aggresively but also more selectively, if we can't
    reuse, malloc a new one.  There is no longer a hard limit on their
    number, they grow to the point where we don't reuse potentially
    usable vnodes.  A vnode will not get recycled if still has pages in
    core or if it is the source of namecache entries (Yes, this does
    indeed work :-)  "." and ".." are not namecache entries any longer...)

11. Do not overload the v_id field in namecache entries with whiteout
    information, use a char sized flags field instead, so we can get
    rid of the vpid and v_id fields from the namecache struct.  Since
    we're linked to the vnodes and purged when they're cleaned, we don't
    have to check the v_id any more.

12. NFS knew about the limitation on name length in the namecache, it
    shouldn't and doesn't now.

Bugs:
        The namecache statistics no longer includes the hits for ".."
        and "." hits.

Performance impact:
        Generally in the +/- 0.5% for "normal" workstations, but
        I hope this will allow the system to be selftuning over a
        bigger range of "special" applications.  The case where
        RAM is available but unused for cache because we don't have
        any vnodes should be gone.

Future work:
        Straighten out the namecache statistics.

        "desiredvnodes" is still used to (bogusly ?) size hash
        tables in the filesystems.

        I have still to find a way to safely free unused vnodes
        back so their number can shrink when not needed.

        There is a few uses of the v_id field left in the filesystems,
        scheduled for demolition at a later time.

        Maybe a one slot cache for unused namecache entries should
        be implemented to decrease the malloc/free frequency.
1997-05-04 09:17:38 +00:00
bin Fixed overflow for attempts to seek to offsets > ULONG_MAX. See the 1997-04-30 17:51:29 +00:00
contrib Let gcc know about libc_r. Use -pthread to link against libc_r instead 1997-05-03 02:58:54 +00:00
crypto Bring in the Starter files for the contrib-crypto dir. 1997-05-03 09:16:07 +00:00
eBones Add include of <sys/types.h> no longer included by <stdio.h>. 1997-04-16 00:05:29 +00:00
etc Use newly introduced pid file field now for ppp 1997-05-04 02:41:29 +00:00
games Use srandomdev() now 1997-03-30 23:33:29 +00:00
gnu delete kcorelow.c, it didn't produce any code and broke init.c 1997-05-02 11:22:51 +00:00
include Don't try to install f2c'h now that it's installed from 1997-04-25 09:58:24 +00:00
lib Nuke makefiles that duplicate those in libc now that libc is libc_r 1997-05-03 04:05:57 +00:00
libexec Fix a bug that caused the relocs for linker set members in shared 1997-04-30 05:18:08 +00:00
lkm Also quiet down the ibcs2 startup (same reason as linux lkm - it screws 1997-05-01 06:09:01 +00:00
release Update some of these release notes. 1997-05-04 00:26:56 +00:00
sbin Commit hooks for ifmedia support. It's optional in the Makefile, and 1997-05-04 06:27:45 +00:00
secure Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
share Update our history a little (whoops - I thought I'd committed 1997-05-04 08:11:24 +00:00
sys 1. Add a {pointer, v_id} pair to the vnode to store the reference to the 1997-05-04 09:17:38 +00:00
tools Add portsinfo, which generate list of new ports for last two weeks. 1997-04-25 14:14:39 +00:00
usr.bin Minor typo. 1997-05-02 22:08:10 +00:00
usr.sbin Log each ppp line to separate /var/log/ppp.tunX.log instead mixing of 1997-05-04 02:39:04 +00:00
COPYRIGHT
Makefile Change default build to include libc_r, but allow disadvantaged souls 1997-05-03 02:51:59 +00:00
README Revert $FreeBSD$ to $Id$ 1997-02-23 09:21:14 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on: $Id$

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.  Please see the top of the Makefile for more information on
the standard build targets and compile-time flags.

Building a kernel with config(8) 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.

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 LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


Source Roadmap:
---------------
bin		System/User commands.

contrib		Packages contributed by 3rd parties.

eBones		Kerberos package - NOT FOR EXPORT!

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.

lib		System libraries.

libexec		System daemons.

lkm		Loadable Kernel Modules.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

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