Hi all, Since the adding of reflink and reverse mapping to the filesystem, deferred log items are used quite a lot more frequently than they used to be. This means that we're cycling a lot of small objects through the slab caches, just like we do with btree cursors. Pack deferred item contexts into memory pages more densely by creating separate slab caches for each type, and shrink the intent items to use less memory. 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=deferred-item-caches-5.16 --- fs/xfs/libxfs/xfs_ag.c | 2 - fs/xfs/libxfs/xfs_alloc.c | 82 +++++++++++++++++++++++++++++++++++++--- fs/xfs/libxfs/xfs_alloc.h | 36 ++++++++++++++++++ fs/xfs/libxfs/xfs_bmap.c | 76 ++++++++++--------------------------- fs/xfs/libxfs/xfs_bmap.h | 35 +++-------------- fs/xfs/libxfs/xfs_bmap_btree.c | 2 - fs/xfs/libxfs/xfs_defer.c | 67 +++++++++++++++++++++++++++++++-- fs/xfs/libxfs/xfs_defer.h | 3 + fs/xfs/libxfs/xfs_ialloc.c | 4 +- fs/xfs/libxfs/xfs_refcount.c | 46 +++++++++++++++------- fs/xfs/libxfs/xfs_refcount.h | 7 +++ fs/xfs/libxfs/xfs_rmap.c | 21 ++++++++++ fs/xfs/libxfs/xfs_rmap.h | 7 +++ fs/xfs/xfs_bmap_item.c | 4 +- fs/xfs/xfs_extfree_item.c | 19 ++++++--- fs/xfs/xfs_refcount_item.c | 4 +- fs/xfs/xfs_reflink.c | 2 - fs/xfs/xfs_rmap_item.c | 4 +- fs/xfs/xfs_super.c | 21 +++++----- 19 files changed, 302 insertions(+), 140 deletions(-)