Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2002 10:02:32 -0700 (PDT)
From:      Matt Dillon <dillon@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern vfs_bio.c vfs_cluster.c vfs_subr.c src/sys/nfsclient nfs_bio.c src/sys/nfsserver nfs_serv.c src/sys/sys buf.h vnode.h
Message-ID:  <200207101702.g6AH2Xtl000528@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
dillon      2002/07/10 10:02:32 PDT

  Modified files:
    sys/kern             vfs_bio.c vfs_cluster.c vfs_subr.c 
    sys/nfsclient        nfs_bio.c 
    sys/nfsserver        nfs_serv.c 
    sys/sys              buf.h vnode.h 
  Log:
  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
  
  Revision  Changes    Path
  1.319     +50 -7     src/sys/kern/vfs_bio.c
  1.121     +8 -4      src/sys/kern/vfs_cluster.c
  1.377     +205 -85   src/sys/kern/vfs_subr.c
  1.109     +2 -2      src/sys/nfsclient/nfs_bio.c
  1.120     +7 -1      src/sys/nfsserver/nfs_serv.c
  1.136     +8 -1      src/sys/sys/buf.h
  1.188     +4 -2      src/sys/sys/vnode.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207101702.g6AH2Xtl000528>