1. 19 10月, 2011 2 次提交
    • J
      nfs: don't redirty inode when ncommit == 0 in nfs_commit_unstable_pages · 3236c3e1
      Jeff Layton 提交于
      commit 420e3646 allowed the kernel to reduce the number of unnecessary
      commit calls by skipping the commit when there are a large number of
      outstanding pages.
      
      However, the current test in nfs_commit_unstable_pages does not handle
      the edge condition properly. When ncommit == 0, then that means that the
      kernel doesn't need to do anything more for the inode. The current test
      though in the WB_SYNC_NONE case will return true, and the inode will end
      up being marked dirty. Once that happens the inode will never be clean
      until there's a WB_SYNC_ALL flush.
      
      Fix this by immediately returning from nfs_commit_unstable_pages when
      ncommit == 0.
      
      Mike noticed this problem initially in RHEL5 (2.6.18-based kernel) which
      has a backported version of 420e3646. The inode cache there was growing
      very large. The inode cache was unable to be shrunk since the inodes
      were all marked dirty. Calling sync() would essentially "fix" the
      problem -- the WB_SYNC_ALL flush would result in the inodes all being
      marked clean.
      
      What I'm not clear on is how big a problem this is in mainline kernels
      as the writeback code there is very different. Either way, it seems
      incorrect to re-mark the inode dirty in this case.
      Reported-by: NMike McLean <mikem@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Cc: stable@kernel.org [2.6.34+]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      3236c3e1
    • T
      Revert "NFS: Ensure that writeback_single_inode() calls write_inode() when syncing" · 59b7c05f
      Trond Myklebust 提交于
      This reverts commit b80c3cb6.
      
      The reverted commit was rendered obsolete by a VFS fix: commit
      5547e8aa (writeback: Update dirty flags in
      two steps). We now no longer need to worry about writeback_single_inode()
      missing our marking the inode for COMMIT in 'do_writepages()' call.
      
      Reverting this patch, fixes a performance regression in which the inode
      would continuously get queued to the dirty list, causing the writeback
      code to unnecessarily try to send a COMMIT.
      
      Signed-off-by: Trond Myklebust <Trond.Myklebust>
      Tested-by: NSimon Kirby <sim@hostway.ca>
      Cc: stable@kernel.org [2.6.35+]
      59b7c05f
  2. 18 10月, 2011 1 次提交
  3. 17 10月, 2011 2 次提交
  4. 15 10月, 2011 4 次提交
  5. 14 10月, 2011 8 次提交
  6. 13 10月, 2011 4 次提交
  7. 12 10月, 2011 3 次提交
  8. 11 10月, 2011 7 次提交
  9. 10 10月, 2011 6 次提交
  10. 09 10月, 2011 1 次提交
  11. 08 10月, 2011 1 次提交
  12. 07 10月, 2011 1 次提交