1. 08 3月, 2012 2 次提交
  2. 06 3月, 2012 5 次提交
  3. 02 3月, 2012 1 次提交
    • T
      NFSv4.1: Get rid of NFS4CLNT_LAYOUTRECALL · 0cb3284b
      Trond Myklebust 提交于
      The NFS4CLNT_LAYOUTRECALL bit is a long-term impediment to scalability. It
      basically stops all other recalls by a given server once any layout recall
      is requested.
      
      If the recall is for a different file, then we don't care.
      If the recall applies to the same file, then we're in one of two situations:
      Either we are in the case of a replay of an existing request, in which case
      the session is supposed to deal with matters, or we are dealing with a
      completely different request, in which case we should just try to process
      it.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      0cb3284b
  4. 01 2月, 2012 8 次提交
  5. 06 1月, 2012 1 次提交
    • C
      NFS: Cache state owners after files are closed · 0aaaf5c4
      Chuck Lever 提交于
      Servers have a finite amount of memory to store NFSv4 open and lock
      owners.  Moreover, servers may have a difficult time determining when
      they can reap their state owner table, thanks to gray areas in the
      NFSv4 protocol specification.  Thus clients should be careful to reuse
      state owners when possible.
      
      Currently Linux is not too careful.  When a user has closed all her
      files on one mount point, the state owner's reference count goes to
      zero, and it is released.  The next OPEN allocates a new one.  A
      workload that serially opens and closes files can run through a large
      number of open owners this way.
      
      When a state owner's reference count goes to zero, slap it onto a free
      list for that nfs_server, with an expiry time.  Garbage collect before
      looking for a state owner.  This makes state owners for active users
      available for re-use.
      
      Now that there can be unused state owners remaining at umount time,
      purge the state owner free list when a server is destroyed.  Also be
      sure not to reclaim unused state owners during state recovery.
      
      This change has benefits for the client as well.  For some workloads,
      this approach drops the number of OPEN_CONFIRM calls from the same as
      the number of OPEN calls, down to just one.  This reduces wire traffic
      and thus open(2) latency.  Before this patch, untarring a kernel
      source tarball shows the OPEN_CONFIRM call counter steadily increasing
      through the test.  With the patch, the OPEN_CONFIRM count remains at 1
      throughout the entire untar.
      
      As long as the expiry time is kept short, I don't think garbage
      collection should be terribly expensive, although it does bounce the
      clp->cl_lock around a bit.
      
      [ At some point we should rationalize the use of the nfs_server
      ->destroy method. ]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      [Trond: Fixed a garbage collection race and a few efficiency issues]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      0aaaf5c4
  6. 28 8月, 2011 1 次提交
  7. 25 8月, 2011 3 次提交
  8. 01 8月, 2011 1 次提交
  9. 20 7月, 2011 1 次提交
  10. 13 7月, 2011 2 次提交
  11. 25 4月, 2011 1 次提交
  12. 25 3月, 2011 2 次提交
  13. 24 3月, 2011 1 次提交
  14. 12 3月, 2011 5 次提交
  15. 07 1月, 2011 3 次提交
  16. 05 1月, 2011 1 次提交
  17. 17 12月, 2010 1 次提交
    • C
      NFS: Simplify ->decode_dirent() calling sequence · 573c4e1e
      Chuck Lever 提交于
      Clean up.
      
      The pointer returned by ->decode_dirent() is no longer used as a
      pointer.  The only call site (xdr_decode() in fs/nfs/dir.c) simply
      extracts the errno value encoded in the pointer.  Replace the
      returned pointer with a standard integer errno return value.
      
      Also, pass the "server" argument as part of the nfs_entry instead of
      as a separate parameter.  It's faster to derive "server" in
      nfs_readdir_xdr_to_array() since we already have the directory's inode
      handy.  "server" ought to be invariant for a set of entries in the
      same directory, right?
      
      The legacy versions of decode_dirent() don't use "server" anyway, so
      it's wasted work for them to derive and pass "server" for each entry.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Tested-by: NJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      573c4e1e
  18. 24 10月, 2010 1 次提交
    • B
      NFS: Readdir plus in v4 · 82f2e547
      Bryan Schumaker 提交于
      By requsting more attributes during a readdir, we can mimic the readdir plus
      operation that was in NFSv3.
      
      To test, I ran the command `ls -lU --color=none` on directories with various
      numbers of files.  Without readdir plus, I see this:
      
      n files |    100    |   1,000   |  10,000   |  100,000  | 1,000,000
      --------+-----------+-----------+-----------+-----------+----------
      real    | 0m00.153s | 0m00.589s | 0m05.601s | 0m56.691s | 9m59.128s
      user    | 0m00.007s | 0m00.007s | 0m00.077s | 0m00.703s | 0m06.800s
      sys     | 0m00.010s | 0m00.070s | 0m00.633s | 0m06.423s | 1m10.005s
      access  | 3         | 1         | 1         | 4         | 31
      getattr | 2         | 1         | 1         | 1         | 1
      lookup  | 104       | 1,003     | 10,003    | 100,003   | 1,000,003
      readdir | 2         | 16        | 158       | 1,575     | 15,749
      total   | 111       | 1,021     | 10,163    | 101,583   | 1,015,784
      
      With readdir plus enabled, I see this:
      
      n files |    100    |   1,000   |  10,000   |  100,000  | 1,000,000
      --------+-----------+-----------+-----------+-----------+----------
      real    | 0m00.115s | 0m00.206s | 0m01.079s | 0m12.521s | 2m07.528s
      user    | 0m00.003s | 0m00.003s | 0m00.040s | 0m00.290s | 0m03.296s
      sys     | 0m00.007s | 0m00.020s | 0m00.120s | 0m01.357s | 0m17.556s
      access  | 3         | 1         | 1         | 1         | 7
      getattr | 2         | 1         | 1         | 1         | 1
      lookup  | 4         | 3         | 3         | 3         | 3
      readdir | 6         | 62        | 630       | 6,300     | 62,993
      total   | 15        | 67        | 635       | 6,305     | 63,004
      
      Readdir plus disabled has about a 16x increase in the number of rpc calls and
      is 4 - 5 times slower on large directories.
      Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      82f2e547