1
0
Fork 0
alistair23-linux/fs/xfs/linux-2.6
Dave Chinner 16fd536737 xfs: track AGs with reclaimable inodes in per-ag radix tree
https://bugzilla.kernel.org/show_bug.cgi?id=16348

When the filesystem grows to a large number of allocation groups,
the summing of recalimable inodes gets expensive. In many cases,
most AGs won't have any reclaimable inodes and so we are wasting CPU
time aggregating over these AGs. This is particularly important for
the inode shrinker that gets called frequently under memory
pressure.

To avoid the overhead, track AGs with reclaimable inodes in the
per-ag radix tree so that we can find all the AGs with reclaimable
inodes via a simple gang tag lookup. This involves setting the tag
when the first reclaimable inode is tracked in the AG, and removing
the tag when the last reclaimable inode is removed from the tree.
Then the summation process becomes a loop walking the radix tree
summing AGs with the reclaim tag set.

This significantly reduces the overhead of scanning - a 6400 AG
filesystea now only uses about 25% of a cpu in kswapd while slab
reclaim progresses instead of being permanently stuck at 100% CPU
and making little progress. Clean filesystems filesystems will see
no overhead and the overhead only increases linearly with the number
of dirty AGs.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-07-20 09:43:39 +10:00
..
kmem.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
kmem.h xfs: replace KM_LARGE with explicit vmalloc use 2010-01-21 13:44:56 -06:00
mrlock.h [XFS] shrink mrlock_t 2008-04-29 15:54:02 +10:00
sv.h remove dead code from sv_t implementation 2008-12-04 15:39:21 +11:00
time.h
xfs_acl.c xfs: constify xattr_handler 2010-05-21 18:31:19 -04:00
xfs_aops.c xfs: remove nr_to_write writeback windup. 2010-06-08 18:12:44 -07:00
xfs_aops.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_buf.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
xfs_buf.h xfs: add blockdev name to kthreads 2010-05-19 09:58:07 -05:00
xfs_cred.h [XFS] Fix merge failures 2008-12-29 16:47:18 +11:00
xfs_dmapi_priv.h [XFS] Remove KERNEL_VERSION macros from xfs_dmapi.h 2006-11-11 18:05:06 +11:00
xfs_export.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_export.h xfs: new export ops 2007-10-22 08:13:20 -07:00
xfs_file.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
xfs_fs_subr.c xfs: remove duplicate buffer flags 2010-01-21 13:44:36 -06:00
xfs_fs_subr.h [XFS] decontaminate vnode operations from behavior details 2007-10-15 16:54:29 +10:00
xfs_globals.c [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_globals.h CRED: Separate task security context from task_struct 2008-11-14 10:39:16 +11:00
xfs_ioctl.c xfs: always use iget in bulkstat 2010-06-23 18:11:11 +10:00
xfs_ioctl.h xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_ioctl32.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_ioctl32.h [XFS] fix compile on 32 bit systems 2008-12-04 13:07:29 +11:00
xfs_iops.c xfs: Check new inode size is OK before preallocating 2010-05-28 15:19:12 -05:00
xfs_iops.h [XFS] add a FMODE flag to make XFS invisible I/O less hacky 2008-12-11 13:14:41 +11:00
xfs_linux.h xfs: kill xfs_lrw.h 2010-03-01 16:35:44 -06:00
xfs_quotaops.c Merge branch 'master' into for-linus 2010-06-04 13:22:30 -05:00
xfs_stats.c xfs: switch to seq_file 2009-09-15 12:29:24 -05:00
xfs_stats.h [XFS] add new btree statistics 2008-10-30 16:55:03 +11:00
xfs_super.c xfs: convert inode shrinker to per-filesystem contexts 2010-07-20 08:07:02 +10:00
xfs_super.h xfs: constify xattr_handler 2010-05-21 18:31:19 -04:00
xfs_sync.c xfs: track AGs with reclaimable inodes in per-ag radix tree 2010-07-20 09:43:39 +10:00
xfs_sync.h xfs: convert inode shrinker to per-filesystem contexts 2010-07-20 08:07:02 +10:00
xfs_sysctl.c sysctl: Drop & in front of every proc_handler. 2009-11-18 08:37:40 -08:00
xfs_sysctl.h [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_trace.c xfs: xfs_trace.c: remove duplicated #include 2010-05-28 15:19:24 -05:00
xfs_trace.h xfs: track AGs with reclaimable inodes in per-ag radix tree 2010-07-20 09:43:39 +10:00
xfs_version.h
xfs_vnode.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_xattr.c xfs: constify xattr_handler 2010-05-21 18:31:19 -04:00