From: Ferry Meng <mengferry@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Ferry Meng <mengferry@linux.alibaba.com>
Subject: [PATCH 2/3] erofs: add necessary kmem_cache_create flags for erofs inode cache
Date: Tue, 15 Aug 2023 17:48:48 +0800 [thread overview]
Message-ID: <20230815094849.53249-2-mengferry@linux.alibaba.com> (raw)
In-Reply-To: <20230815094849.53249-1-mengferry@linux.alibaba.com>
To improve memory access efficiency and enable statistics functionality,
add SLAB_MEM_SPREAD and SLAB_ACCOUNT flag during erofs_icachep's allocation
time.
Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
---
fs/erofs/super.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index ae5caf605ffc..82f41d09f8d8 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -937,9 +937,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;
--
2.19.1.6.gb485710b
next prev parent reply other threads:[~2023-08-15 9:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 9:48 [PATCH 1/3] erofs: clean up redundant comment and adjust code alignment Ferry Meng
2023-08-15 9:48 ` Ferry Meng [this message]
2023-08-15 15:13 ` [PATCH 2/3] erofs: add necessary kmem_cache_create flags for erofs inode cache Gao Xiang
2023-08-23 14:45 ` Chao Yu
2023-08-15 9:48 ` [PATCH 3/3] erofs: remove redundant erofs_fs_type declaration in super.c Ferry Meng
2023-08-15 15:15 ` Gao Xiang
2023-08-23 14:46 ` Chao Yu
2023-08-15 15:14 ` [PATCH 1/3] erofs: clean up redundant comment and adjust code alignment Gao Xiang
2023-08-15 15:15 ` Gao Xiang
2023-08-23 14:38 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230815094849.53249-2-mengferry@linux.alibaba.com \
--to=mengferry@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox