Skip to contentSkip to conversation

ocfs2: remove SLAB_MEM_SPREAD flag usage

PATCH Applied [email protected] 2 participants 4 messages Feb 24, 2024 – Feb 26, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: remove SLAB_MEM_SPREAD flag usage

From: Chengming Zhou <[email protected]>

The SLAB_MEM_SPREAD flag is already a no-op as of 6.8-rc1, remove its usage so we can delete it from slab. No functional change.

---
 fs/ocfs2/dlmfs/dlmfs.c | 2 +-
 fs/ocfs2/super.c       | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
fs/ocfs2/dlmfs/dlmfs.c +1 -1
index 85215162c9dd..7fc0e920eda7 100644
@@ -578,7 +578,7 @@ static int __init init_dlmfs_fs(void)
 	dlmfs_inode_cache = kmem_cache_create("dlmfs_inode_cache",
 				sizeof(struct dlmfs_inode_private),
 				0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
-					SLAB_MEM_SPREAD|SLAB_ACCOUNT),
+					SLAB_ACCOUNT),
 				dlmfs_init_once);
 	if (!dlmfs_inode_cache) {
 		status = -ENOMEM;
fs/ocfs2/super.c +3 -4
index 014c22c4d9d9..8aabaed2c1cb 100644
@@ -1706,18 +1706,17 @@ static int ocfs2_initialize_mem_caches(void)
 				       sizeof(struct ocfs2_inode_info),
 				       0,
 				       (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
-						SLAB_MEM_SPREAD|SLAB_ACCOUNT),
+						SLAB_ACCOUNT),
 				       ocfs2_inode_init_once);
 	ocfs2_dquot_cachep = kmem_cache_create("ocfs2_dquot_cache",
 					sizeof(struct ocfs2_dquot),
 					0,
-					(SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
-						SLAB_MEM_SPREAD),
+					SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
 					NULL);
 	ocfs2_qf_chunk_cachep = kmem_cache_create("ocfs2_qf_chunk_cache",
 					sizeof(struct ocfs2_quota_chunk),
 					0,
-					(SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD),
+					SLAB_RECLAIM_ACCOUNT,
 					NULL);
 	if (!ocfs2_inode_cachep || !ocfs2_dquot_cachep ||
 	    !ocfs2_qf_chunk_cachep) {
Signature · 1 line
2.40.1
maintainer
#1 lore raw
Quoted 5 lines · On 2/24/24 9:50 PM, [email protected] wrote:

From: Chengming Zhou <[email protected]>

The SLAB_MEM_SPREAD flag is already a no-op as of 6.8-rc1, remove its usage so we can delete it from slab. No functional change.

If I understand correctly, you are referring the following patch:
https://lore.kernel.org/all/[email protected]/

But it seems that the above patch is not included in mainline yet. Or am I missing something?

Joseph

#2 lore raw
Quoted 5 lines · Joseph Qi
Quoted 2 lines · On 2/24/24 9:50 PM, [email protected] wrote:

From: Chengming Zhou <[email protected]>

Quoted 8 lines
Quoted 3 lines

The SLAB_MEM_SPREAD flag is already a no-op as of 6.8-rc1, remove its usage so we can delete it from slab. No functional change.

If I understand correctly, you are referring the following patch:
https://lore.kernel.org/all/[email protected]/

But it seems that the above patch is not included in mainline yet. Or am I missing something?

I realize my commit message should explain more why it's a no-op, my bad.

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed so it became a dead flag as of v6.8-rc1. That series[1] mark it obsolete to avoid confusion for users. So here we can just remove all its users, which has no functional changes.

[1] https://lore.kernel.org/all/[email protected]/

Thanks!

Quoted 3 lines

Joseph

maintainer Acked-by
#3 lore raw
Quoted 15 lines · Chengming Zhou
Quoted 5 lines · Joseph Qi
Quoted 2 lines · On 2/24/24 9:50 PM, [email protected] wrote:

From: Chengming Zhou <[email protected]>

Quoted 8 lines
Quoted 3 lines

The SLAB_MEM_SPREAD flag is already a no-op as of 6.8-rc1, remove its usage so we can delete it from slab. No functional change.

If I understand correctly, you are referring the following patch:
https://lore.kernel.org/all/[email protected]/

But it seems that the above patch is not included in mainline yet. Or am I missing something?

Quoted 9 lines

I realize my commit message should explain more why it's a no-op, my bad.

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed so it became a dead flag as of v6.8-rc1. That series[1] mark it obsolete to avoid confusion for users. So here we can just remove all its users, which has no functional changes.

[1] https://lore.kernel.org/all/[email protected]/

Take more look at v6.8-rc1, I've found the following commit:
16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h")
It seems that after this commit, there is no user of 'SLAB_MEM_SPREAD'. So,