kernel_optimize_test/fs/xfs
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
..
linux-2.6 xfs: track AGs with reclaimable inodes in per-ag radix tree 2010-07-20 09:43:39 +10:00
quota mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
support
Kconfig
Makefile
xfs_acl.h
xfs_ag.h xfs: fix access to upper inodes without inode64 2010-05-28 15:19:56 -05:00
xfs_alloc_btree.c
xfs_alloc_btree.h
xfs_alloc.c
xfs_alloc.h
xfs_arch.h
xfs_attr_leaf.c
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_attr.c
xfs_attr.h
xfs_bit.c
xfs_bit.h
xfs_bmap_btree.c
xfs_bmap_btree.h
xfs_bmap.c
xfs_bmap.h
xfs_btree_trace.c
xfs_btree_trace.h
xfs_btree.c
xfs_btree.h
xfs_buf_item.c
xfs_buf_item.h
xfs_da_btree.c
xfs_da_btree.h
xfs_dfrag.c xfs: prevent swapext from operating on write-only files 2010-06-24 12:07:47 +10:00
xfs_dfrag.h
xfs_dinode.h
xfs_dir2_block.c
xfs_dir2_block.h
xfs_dir2_data.c
xfs_dir2_data.h
xfs_dir2_leaf.c
xfs_dir2_leaf.h
xfs_dir2_node.c
xfs_dir2_node.h
xfs_dir2_sf.c
xfs_dir2_sf.h
xfs_dir2.c
xfs_dir2.h
xfs_dmapi.h
xfs_dmops.c
xfs_error.c
xfs_error.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_filestream.c
xfs_filestream.h
xfs_fs.h
xfs_fsops.c
xfs_fsops.h
xfs_ialloc_btree.c
xfs_ialloc_btree.h
xfs_ialloc.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_ialloc.h
xfs_iget.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_inode_item.c
xfs_inode_item.h
xfs_inode.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_inode.h xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_inum.h
xfs_iomap.c
xfs_iomap.h
xfs_itable.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_itable.h xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_log_cil.c
xfs_log_priv.h
xfs_log_recover.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_log_recover.h
xfs_log.c
xfs_log.h
xfs_mount.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_mount.h xfs: convert inode shrinker to per-filesystem contexts 2010-07-20 08:07:02 +10:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_quota.h
xfs_refcache.h
xfs_rename.c
xfs_rtalloc.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_rtalloc.h
xfs_rw.c
xfs_rw.h
xfs_sb.h
xfs_trans_ail.c
xfs_trans_buf.c
xfs_trans_extfree.c
xfs_trans_inode.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_trans_item.c
xfs_trans_priv.h
xfs_trans_space.h
xfs_trans.c
xfs_trans.h
xfs_types.h
xfs_utils.c
xfs_utils.h
xfs_vnodeops.c xfs: remove block number from inode lookup code 2010-06-24 11:35:17 +10:00
xfs_vnodeops.h
xfs.h