[PATCHSET v2 0/7] xfs: consolidate posteof and cowblocks cleanup

Darrick J. Wong
2021-01-12T00:30:27Z

Hi all,

Currently, we treat the garbage collection of post-EOF preallocations
and copy-on-write preallocations as totally separate tasks -- different
incore inode tags, different workqueues, etc. This is wasteful of radix
tree tags and workqueue resources since we effectively have parallel
code paths to do the same thing.

Therefore, consolidate both functions under one radix tree bit and one
workqueue function that scans an inode for both things at the same time.
At the end of the series we make the scanning per-AG instead of per-fs
so that the scanning can run in parallel. This reduces locking
contention from background threads and will free up a radix tree bit for
the deferred inode inactivation series.

v2: clean up and rebase against 5.11.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything. Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=eofblocks-consolidation-5.12
---
fs/xfs/scrub/common.c | 4 -
fs/xfs/xfs_bmap_util.c | 109 +++++++++-------------
fs/xfs/xfs_buf.c | 34 +++++++
fs/xfs/xfs_buf.h | 1
fs/xfs/xfs_globals.c | 7 +
fs/xfs/xfs_icache.c | 240 +++++++++++++++++++++++-------------------------
fs/xfs/xfs_icache.h | 13 +--
fs/xfs/xfs_inode.c | 36 +++++++
fs/xfs/xfs_inode.h | 2
fs/xfs/xfs_iwalk.c | 2
fs/xfs/xfs_linux.h | 3 -
fs/xfs/xfs_mount.c | 44 +++++++++
fs/xfs/xfs_mount.h | 10 +-
fs/xfs/xfs_pwork.c | 17 +--
fs/xfs/xfs_pwork.h | 2
fs/xfs/xfs_super.c | 43 ++++++---
fs/xfs/xfs_sysctl.c | 15 +--
fs/xfs/xfs_sysctl.h | 3 -
fs/xfs/xfs_trace.h | 6 -
19 files changed, 341 insertions(+), 250 deletions(-)