git: network - Tokenize NFS, fix MP races
    Matthew Dillon 
    dillon at crater.dragonflybsd.org
       
    Fri Sep 10 12:16:47 PDT 2010
    
    
  
commit c6b43e93a6cf0a70bde32cd141057a0df9860e13
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Sep 10 12:09:34 2010 -0700
    network - Tokenize NFS, fix MP races
    
    * Now that the rest of the network stack is running MPSAFE, poor NFS is
      hitting races and other issues because it was depending on the MP lock.
    
    * Recombobulate NFS with tokens, protecting all border crossings:
    
      A global nfs_token is used for the nfs mount list, nfsd list, and
      server socket list.
    
      A per-socket token (nfssvc_sock->ns_token) governs each served mount.
    
      A per-mount token (nfsmount->nm_token) governs each client mount.
    
    * Callouts and TCP upcalls are protected.  The per-socket TCP upcall
      is protected by the nfssvc_sock token.
    
    * The NFS iod thread pairs and nfsd threads now run MPSAFE.
    
    * NFSv3 is now holy-shit fast and can trivially max-out a GigE link
      without TSO when the server is not otherwise limited by server-side
      disks.
Summary of changes:
 sys/vfs/nfs/nfs.h          |    7 ++-
 sys/vfs/nfs/nfs_bio.c      |   14 ++--
 sys/vfs/nfs/nfs_iod.c      |   19 +----
 sys/vfs/nfs/nfs_node.c     |   11 +++-
 sys/vfs/nfs/nfs_socket.c   |   32 +++++++-
 sys/vfs/nfs/nfs_subs.c     |    8 ++-
 sys/vfs/nfs/nfs_syscalls.c |   91 ++++++++++++++++++-----
 sys/vfs/nfs/nfs_vfsops.c   |   41 +++++++++-
 sys/vfs/nfs/nfs_vnops.c    |  174 ++++++++++++++++++++++++++++++++++++++-----
 sys/vfs/nfs/nfsmount.h     |    2 +
 10 files changed, 324 insertions(+), 75 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c6b43e93a6cf0a70bde32cd141057a0df9860e13
-- 
DragonFly BSD source repository
    
    
More information about the Commits
mailing list