]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
xfs: add a shrinker to background inode reclaim
authorDave Chinner <dchinner@redhat.com>
Tue, 4 May 2010 02:58:20 +0000 (12:58 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 May 2010 22:02:53 +0000 (15:02 -0700)
commit467e1b31ef815aadd8c7648929fd1fa8d46b811d
tree4faf37a6a5f5cbc1b653a06c8e34c03d0c3d563a
parent4d3dbcf9153c50f485094fdc8c3edb9affb49be8
xfs: add a shrinker to background inode reclaim

commit 9bf729c0af67897ea8498ce17c29b0683f7f2028 upstream

On low memory boxes or those with highmem, kernel can OOM before the
background reclaims inodes via xfssyncd. Add a shrinker to run inode
reclaim so that it inode reclaim is expedited when memory is low.

This is more complex than it needs to be because the VM folk don't
want a context added to the shrinker infrastructure. Hence we need
to add a global list of XFS mount structures so the shrinker can
traverse them.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/linux-2.6/xfs_sync.h
fs/xfs/quota/xfs_qm_syscalls.c
fs/xfs/xfs_ag.h
fs/xfs/xfs_mount.h