From e2c78949b641d34cb4051b32c2fa5e03a4bfef35 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Sun, 22 May 2022 15:59:48 +1000 Subject: xfs: use a separate slab cache for deferred xattr work state Create a separate slab cache for struct xfs_attr_item objects, since we can pack the (104-byte) intent items more tightly than we can with the general slab cache objects. On x86, this means 39 intents per memory page instead of 32. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- fs/xfs/xfs_attr_item.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs/xfs/xfs_attr_item.c') diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c index 5397b7894da0..f85bcbfc2478 100644 --- a/fs/xfs/xfs_attr_item.c +++ b/fs/xfs/xfs_attr_item.c @@ -404,7 +404,10 @@ xfs_attr_free_item( { if (attr->xattri_da_state) xfs_da_state_free(attr->xattri_da_state); - kmem_free(attr); + if (attr->xattri_da_args->op_flags & XFS_DA_OP_RECOVERY) + kmem_free(attr); + else + kmem_cache_free(xfs_attr_intent_cache, attr); } /* Process an attr. */ -- cgit v1.2.3