1. 29 Jul, 2010 3 commits
  2. 27 Jul, 2010 1 commit
    • J. Bruce Fields's avatar
      nfsd: bypass readahead cache when have struct file · fa0a2126
      J. Bruce Fields authored
      The readahead cache compensates for the fact that the NFS server
      currently does an open and close on every IO operation in the NFSv2 and
      NFSv3 case.
      
      In the NFSv4 case we have long-lived struct files associated with client
      opens, so there's no need for this.  In fact, concurrent IO's using
      trying to modify the same file->f_ra may cause problems.
      
      So, don't bother with the readahead cache in that case.
      
      Note eventually we'll likely do this in the v2/v3 case as well by
      keeping a cache of struct files instead of struct file_ra_state's.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      fa0a2126
  3. 23 Jul, 2010 8 commits
  4. 07 Jul, 2010 1 commit
    • Chuck Lever's avatar
      NFSD: Fill in WCC data for REMOVE, RMDIR, MKNOD, and MKDIR · 43a9aa64
      Chuck Lever authored
      Some well-known NFSv3 clients drop their directory entry caches when
      they receive replies with no WCC data.  Without this data, they
      employ extra READ, LOOKUP, and GETATTR requests to ensure their
      directory entry caches are up to date, causing performance to suffer
      needlessly.
      
      In order to return WCC data, our server has to have both the pre-op
      and the post-op attribute data on hand when a reply is XDR encoded.
      The pre-op data is filled in when the incoming fh is locked, and the
      post-op data is filled in when the fh is unlocked.
      
      Unfortunately, for REMOVE, RMDIR, MKNOD, and MKDIR, the directory fh
      is not unlocked until well after the reply has been XDR encoded.  This
      means that encode_wcc_data() does not have wcc_data for the parent
      directory, so none is returned to the client after these operations
      complete.
      
      By unlocking the parent directory fh immediately after the internal
      operations for each NFS procedure is complete, the post-op data is
      filled in before XDR encoding starts, so it can be returned to the
      client properly.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      43a9aa64
  5. 06 Jul, 2010 2 commits
    • J. Bruce Fields's avatar
      6a85d6c7
    • Artem Bityutskiy's avatar
      sunrpc: make the cache cleaner workqueue deferrable · 8eab945c
      Artem Bityutskiy authored
      This patch makes the cache_cleaner workqueue deferrable, to prevent
      unnecessary system wake-ups, which is very important for embedded
      battery-powered devices.
      
      do_cache_clean() is called every 30 seconds at the moment, and often
      makes the system wake up from its power-save sleep state. With this
      change, when the workqueue uses a deferrable timer, the
      do_cache_clean() invocation will be delayed and combined with the
      closest "real" wake-up. This improves the power consumption situation.
      
      Note, I tried to create a DECLARE_DELAYED_WORK_DEFERRABLE() helper
      macro, similar to DECLARE_DELAYED_WORK(), but failed because of the
      way the timer wheel core stores the deferrable flag (it is the
      LSBit in the time->base pointer). My attempt to define a static
      variable with this bit set ended up with the "initializer element is
      not constant" error.
      
      Thus, I have to use run-time initialization, so I created a new
      cache_initialize() function which is called once when sunrpc is
      being initialized.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      8eab945c
  6. 24 Jun, 2010 2 commits
  7. 23 Jun, 2010 1 commit
  8. 22 Jun, 2010 3 commits
  9. 31 May, 2010 4 commits
  10. 30 May, 2010 15 commits