[PATCH 0/14] Per superblock cache reclaim

July 08th, 2011 - 12:20 am ET by Dave Chinner | Report spam
This series converts the VFS cache shrinkers to a per-superblock
shrinker, and provides a callout from the superblock shrinker to
allow the filesystem to shrink internal caches proportionally to the
amount of reclaim done to the VFS caches.

The original posting contains the motiviation, benefits, performance,
etc, and rather than repeat it all, just look here:

https://lkml.org/lkml/2011/6/2/42

The version has been rebased onto the untested branch in Al's VFS
git tree, fixes the review comments from the first version, and
has had much more testing under different workloads.



Version 2:
o rebase onto Al's #untested branch
o fix build problem in Al's untested branch
o move all slab shrinker modifications tracepoints into a single
patch.
o renames some of the tracepoint variables to be more obvious as to
what they are recording.
o move pin_sb_for_writeback() to fs/super.c and rename it to
grab_super_passive() so the shrinker and writeback use the same
passive reference counting and unmount detection
o rework per-superblock shrinker to use grab_super_passive()
o minor typo fixes in commit messages, documentation and commit
messages



When the git mirror updates, this patchset will also be available in
the git repository at:

git://git.kernel.org/pub/scm/linux/...xfsdev.git per-sb-shrinker

If you get a version based on the current Linus tree, then it hasn't
updated yet

Dave Chinner (14):
dcache: fix __d_alloc prototype to use const
vmscan: add shrink_slab tracepoints
vmscan: shrinker->nr updates race and go wrong
vmscan: reduce wind up shrinker->nr when shrinker can't do work
vmscan: add customisable shrinker batch size
inode: convert inode_stat.nr_unused to per-cpu counters
inode: Make unused inode LRU per superblock
inode: move to per-sb LRU locks
superblock: move pin_sb_for_writeback() to fs/super.c
superblock: introduce per-sb cache shrinker infrastructure
inode: remove iprune_sem
superblock: add filesystem shrinker operations
vfs: increase shrinker batch size
xfs: make use of new shrinker callout for the inode cache

Documentation/filesystems/vfs.txt | 22 +++++++
fs/dcache.c | 121 ++++--
fs/fs-writeback.c | 28 +--
fs/inode.c | 124 ++++++++++++-
fs/internal.h | 3 +-
fs/libfs.c | 2 +
fs/super.c | 109 ++++++++++++++++++++++++++++++++-
fs/xfs/linux-2.6/xfs_super.c | 26 +++++
fs/xfs/linux-2.6/xfs_sync.c | 71 ++++++++-
fs/xfs/linux-2.6/xfs_sync.h | 5 +-
include/linux/fs.h | 14 ++++
include/linux/mm.h | 1 +
include/trace/events/vmscan.h | 71 +++++++++++++++++++++
mm/vmscan.c | 71 +++++++++++++++++--
14 files changed, 374 insertions(+), 294 deletions(-)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussionReplies 5 repliesReplies Make a reply

Replies

#1 Christoph Hellwig
July 11th, 2011 - 06:00 am ET | Report spam
On Fri, Jul 08, 2011 at 02:14:34PM +1000, Dave Chinner wrote:
From: Dave Chinner

??t is impossible to understand what the shrinkers are actually doing
without instrumenting the code, so add a some tracepoints to allow
insight to be gained.

Signed-off-by: Dave Chinner



Looks good. But wouldn't it be a good idea to give the shrinkers names
so that we can pretty print those in the trace event?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Similar topics