xfs: add a shrinker to background inode reclaim
commita899608c6a4c0ffd5219e7bf904b42aba0e6b9c1
authorDave Chinner <dchinner@redhat.com>
Tue, 4 May 2010 02:58:20 +0000 (4 12:58 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 May 2010 21:57:13 +0000 (12 14:57 -0700)
tree306feca16e0abe62ff1e0a50f41862a8e2e0fbc1
parent47d6fa8014314cf139d407840a85a1bd14588561
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