Skip to contentSkip to conversation

net: remove SLAB_MEM_SPREAD flag usage

PATCH In review [email protected] 3 participants 6 messages Feb 24, 2024 – Feb 29, 2024

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

PATCH 1/1 net: 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.

---
 net/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/socket.c +1 -1
index ed3df2f749bf..7e9c8fc9a5b4 100644
@@ -343,7 +343,7 @@ static void init_inodecache(void)
 					      0,
 					      (SLAB_HWCACHE_ALIGN |
 					       SLAB_RECLAIM_ACCOUNT |
-					       SLAB_MEM_SPREAD | SLAB_ACCOUNT),
+					       SLAB_ACCOUNT),
 					      init_once);
 	BUG_ON(sock_inode_cachep == NULL);
 }
Signature · 1 line
2.40.1
#1 lore raw
Quoted 4 lines · On 2024/2/24 21:49, [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.

Update changelog to make it clearer:

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed as of v6.8-rc1, so it became a dead flag since the commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h"). And the series[1] went on to mark it obsolete explicitly to avoid confusion for users. Here we can just remove all its users, which has no any functional change.

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

Thanks!

Quoted 19 lines
---
 net/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/socket.c +1 -1
index ed3df2f749bf..7e9c8fc9a5b4 100644
@@ -343,7 +343,7 @@ static void init_inodecache(void)
 					      0,
 					      (SLAB_HWCACHE_ALIGN |
 					       SLAB_RECLAIM_ACCOUNT |
-					       SLAB_MEM_SPREAD | SLAB_ACCOUNT),
+					       SLAB_ACCOUNT),
 					      init_once);
 	BUG_ON(sock_inode_cachep == NULL);
 }
reviewer
#2 lore raw
Quoted 15 lines · Chengming Zhou
Quoted 4 lines · On 2024/2/24 21:49, [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.

Update changelog to make it clearer:

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed as of v6.8-rc1, so it became a dead flag since the commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h"). And the series[1] went on to mark it obsolete explicitly to avoid confusion for users. Here we can just remove all its users, which has no any functional change.

Quoted 6 lines

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

Thanks!

Quoted 2 lines

Thanks Chengming Zhou,

this seems reasonable to me. But I think it would be best to post a v2 of this patch with the updated patch description (which is very helpful, BTW).

Signature · 1 line
pw-bot: changes-requested
#3 lore raw

PATCH v2 1/1 net: remove SLAB_MEM_SPREAD flag usage

From: Chengming Zhou <[email protected]>

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed as of v6.8-rc1, so it became a dead flag since the commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h"). And the series[1] went on to mark it obsolete to avoid confusion for users. Here we can just remove all its users, which has no functional change.

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

---
v2:
- Update the patch description and include the related link to make it clearer that SLAB_MEM_SPREAD flag is now a no-op.

---
 net/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/socket.c +1 -1
index ed3df2f749bf..7e9c8fc9a5b4 100644
@@ -343,7 +343,7 @@ static void init_inodecache(void)
 					      0,
 					      (SLAB_HWCACHE_ALIGN |
 					       SLAB_RECLAIM_ACCOUNT |
-					       SLAB_MEM_SPREAD | SLAB_ACCOUNT),
+					       SLAB_ACCOUNT),
 					      init_once);
 	BUG_ON(sock_inode_cachep == NULL);
 }
Signature · 1 line
2.40.1
reviewer Reviewed-by on v2 1/1
#4 lore raw
Quoted 8 lines · Chengming Zhou

From: Chengming Zhou <[email protected]>

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed as of v6.8-rc1, so it became a dead flag since the commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h"). And the series[1] went on to mark it obsolete to avoid confusion for users. Here we can just remove all its users, which has no functional change.

Quoted 7 lines

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

---
v2:
- Update the patch description and include the related link to make it clearer that SLAB_MEM_SPREAD flag is now a no-op.

Thanks for the update.

#5 lore raw
In reply to Chengming Zhou
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Wed, 28 Feb 2024 03:06:58 +0000 you wrote:

From: Chengming Zhou <[email protected]>

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed as of v6.8-rc1, so it became a dead flag since the commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h"). And the series[1] went on to mark it obsolete to avoid confusion for users. Here we can just remove all its users, which has no functional change.

[...]

Here is the summary with links:
- [v2] net: remove SLAB_MEM_SPREAD flag usage

    https://git.kernel.org/netdev/net-next/c/d4f01c5e477a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html