diff options
author | Ferry Meng <mengferry@linux.alibaba.com> | 2023-08-15 17:48:48 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-08-23 23:40:03 +0800 |
commit | 8ec9a25258244c4b3955ad052cd4c74ccf3d5d6a (patch) | |
tree | 1e191f2e68d47daedbfd52ce662fe1370e0237da /fs | |
parent | 428f27cc8d3202ebbc5013fe53e8596949955d85 (diff) |
erofs: add necessary kmem_cache_create flags for erofs inode cache
To improve memory access efficiency and enable statistics functionality,
add SLAB_MEM_SPREAD and SLAB_ACCOUNT flag during erofs_inode_cachep's
allocation time.
Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20230815094849.53249-2-mengferry@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/erofs/super.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/erofs/super.c b/fs/erofs/super.c index f3b33332a446..e5fb1775dd02 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -941,9 +941,9 @@ static int __init erofs_module_init(void) erofs_check_ondisk_layout_definitions(); erofs_inode_cachep = kmem_cache_create("erofs_inode", - sizeof(struct erofs_inode), 0, - SLAB_RECLAIM_ACCOUNT, - erofs_inode_init_once); + sizeof(struct erofs_inode), 0, + SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD | SLAB_ACCOUNT, + erofs_inode_init_once); if (!erofs_inode_cachep) return -ENOMEM; |