freebsd-dev/sys/nfsserver
Matthew Dillon d331c5d43f Replace the global buffer hash table with per-vnode splay trees using a
methodology similar to the vm_map_entry splay and the VM splay that Alan
Cox is working on.  Extensive testing has appeared to have shown no
increase in overhead.

Disadvantages
    Dirties more cache lines during lookups.

    Not as fast as a hash table lookup (but still N log N and optimal
    when there is locality of reference).

Advantages
    vnode->v_dirtyblkhd is now perfectly sorted, making fsync/sync/filesystem
    syncer operate more efficiently.

    I get to rip out all the old hacks (some of which were mine) that tried
    to keep the v_dirtyblkhd tailq sorted.

    The per-vnode splay tree should be easier to lock / SMPng pushdown on
    vnodes will be easier.

    This commit along with another that Alan is working on for the VM page
    global hash table will allow me to implement ranged fsync(), optimize
    server-side nfs commit rpcs, and implement partial syncs by the
    filesystem syncer (aka filesystem syncer would detect that someone is
    trying to get the vnode lock, remembers its place, and skip to the
    next vnode).

Note that the buffer cache splay is somewhat more complex then other splays
due to special handling of background bitmap writes (multiple buffers with
the same lblkno in the same vnode), and B_INVAL discontinuities between the
old hash table and the existence of the buffer on the v_cleanblkhd list.

Suggested by: alc
2002-07-10 17:02:32 +00:00
..
nfs_serv.c Replace the global buffer hash table with per-vnode splay trees using a 2002-07-10 17:02:32 +00:00
nfs_srvcache.c Unwind some more macros. NFSMADV() was kinda silly since it was right 2001-09-28 04:37:08 +00:00
nfs_srvsock.c Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
nfs_srvsubs.c Remove references to vm_zone.h and switch over to the new uma API. 2002-03-20 10:07:52 +00:00
nfs_syscalls.c Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
nfs.h More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
nfsm_subs.h The macro nfsm_reply() is supposed to allocate a reply in all cases, 2002-01-11 22:22:39 +00:00
nfsrvcache.h Cleanup and split of nfs client and server code. 2001-09-18 23:32:09 +00:00
nfsrvstats.h Cleanup and split of nfs client and server code. 2001-09-18 23:32:09 +00:00