]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Improve metadata buffer reclaim accountability
authorDave Chinner <dchinner@redhat.com>
Wed, 25 Mar 2020 03:10:28 +0000 (20:10 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 27 Mar 2020 15:32:54 +0000 (08:32 -0700)
commit13dcb09096cafaf669b27d82498dc8a40ceb9ff1
tree60e8a3c7fad50fdbd1a5bdc4adab5a32ff10dde2
parent9cdfe69ef15d198efa437eedb8200dd486b9d707
xfs: Improve metadata buffer reclaim accountability

The buffer cache shrinker frees more than just the xfs_buf slab
objects - it also frees the pages attached to the buffers. Make sure
the memory reclaim code accounts for this memory being freed
correctly, similar to how the inode shrinker accounts for pages
freed from the page cache due to mapping invalidation.

We also need to make sure that the mm subsystem knows these are
reclaimable objects. We provide the memory reclaim subsystem with a
a shrinker to reclaim xfs_bufs, so we should really mark the slab
that way.

We also have a lot of xfs_bufs in a busy system, spread them around
like we do inodes.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_buf.c