kernel_optimize_test/fs
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
..
9p
adfs
affs
afs writeback: remove writeback_inodes_wbc 2010-07-06 08:54:03 +02:00
autofs
autofs4
befs
bfs
btrfs writeback: remove writeback_inodes_wbc 2010-07-06 08:54:03 +02:00
cachefiles
ceph ceph: fix crush device 'out' threshold to 1.0, not 0.1 2010-07-05 09:44:17 -07:00
cifs cifs: remove bogus first_time check in NTLMv2 session setup code 2010-06-16 13:40:18 -04:00
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs
efs
exofs
exportfs
ext2 ext2: update ctime when changing the file's permission by setfacl 2010-06-25 01:20:37 +02:00
ext3 ext3: update ctime when changing the file's permission by setfacl 2010-06-25 01:20:37 +02:00
ext4
fat
freevxfs
fscache
fuse
gfs2 mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2 jbd2/ocfs2: Fix block checksumming when a buffer is used in several transactions 2010-07-15 15:17:47 -07:00
jffs2
jfs
lockd
logfs
minix
ncpfs
nfs mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
nfs_common
nfsd Merge branch 'for-2.6.35' of git://linux-nfs.org/~bfields/linux 2010-06-09 12:43:04 -07:00
nilfs2
nls
notify
ntfs
ocfs2 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 2010-07-18 10:09:25 -07:00
omfs
openpromfs
partitions [S390] dasd: use correct label location for diag fba disks 2010-07-19 09:22:50 +02:00
proc nommu: add '[stack]' label to /proc/pid/maps output 2010-06-29 15:29:30 -07:00
qnx4
quota mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
ramfs
reiserfs
romfs
smbfs
squashfs
sysfs
sysv sysvfs: fix NULL deref. when allocating new inode 2010-06-29 15:29:32 -07:00
ubifs mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
udf
ufs
xfs xfs: track AGs with reclaimable inodes in per-ag radix tree 2010-07-20 09:43:39 +10:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c flat: tweak default stack alignment 2010-06-29 15:29:31 -07:00
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c block: remove duplicate BUG_ON() in bd_finish_claiming() 2010-06-10 19:08:34 +02:00
buffer.c
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
dcache.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c fs/fcntl.c:kill_fasync_rcu() fa_lock must be IRQ-safe 2010-06-29 15:29:32 -07:00
fifo.c
file_table.c
file.c
filesystems.c
fs_struct.c
fs-writeback.c writeback: simplify the write back thread queue 2010-07-06 08:59:53 +02:00
generic_acl.c
inode.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
mpage.c
namei.c
namespace.c
nfsctl.c
no-block.c
open.c
pipe.c pipe: fix check in "set size" fcntl 2010-06-10 19:08:34 +02:00
pnode.c
pnode.h
posix_acl.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c splice: check f_mode for seekable file 2010-06-30 08:12:37 +02:00
stack.c
stat.c
statfs.c
super.c fs: fix superblock iteration race 2010-06-29 10:38:22 -07:00
sync.c
timerfd.c
utimes.c
xattr_acl.c
xattr.c