mbox series

[PATCHSET,v3,00/10] xfs: consolidate posteof and cowblocks cleanup

Message ID 161100798100.90204.7839064495063223590.stgit@magnolia (mailing list archive)
Headers show
Series xfs: consolidate posteof and cowblocks cleanup | expand


Darrick J. Wong Jan. 18, 2021, 10:13 p.m. UTC
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.
v3: various streamlining as part of restructuring the space reclaim series

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.


kernel git tree:
 fs/xfs/scrub/common.c |    4 -
 fs/xfs/xfs_globals.c  |    7 +
 fs/xfs/xfs_icache.c   |  258 +++++++++++++++++++++----------------------------
 fs/xfs/xfs_icache.h   |   16 +--
 fs/xfs/xfs_ioctl.c    |    2 
 fs/xfs/xfs_iwalk.c    |    2 
 fs/xfs/xfs_linux.h    |    3 -
 fs/xfs/xfs_mount.c    |    5 +
 fs/xfs/xfs_mount.h    |    9 +-
 fs/xfs/xfs_pwork.c    |   80 ++++++++++++++-
 fs/xfs/xfs_pwork.h    |    3 -
 fs/xfs/xfs_super.c    |   51 +++++++---
 fs/xfs/xfs_sysctl.c   |   15 +--
 fs/xfs/xfs_sysctl.h   |    3 -
 fs/xfs/xfs_trace.h    |    6 -
 15 files changed, 253 insertions(+), 211 deletions(-)