linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread()
@ 2024-02-29 14:20 Xiongwei Song
  2024-02-29 14:20 ` [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete Xiongwei Song
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Xiongwei Song @ 2024-02-29 14:20 UTC (permalink / raw)
  To: longman, lizefan.x, tj, hannes, corbet
  Cc: vbabka, yosryahmed, rostedt, cl, chengming.zhou, zhengyejian1,
	cgroups, linux-mmc, linux-doc, linux-kernel

The SLAB allocator has been removed sine 6.8-rc1 [1], so there is no user
with SLAB_MEM_SPREAD and cpuset_do_slab_mem_spread(). Then SLAB_MEM_SPREAD
is marked as unused by [2]. Here we can remove
cpuset_do_slab_mem_spread(). For more details, please check [3].

[1] https://lore.kernel.org/linux-mm/20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz/
[2] https://lore.kernel.org/linux-kernel/20240223-slab-cleanup-flags-v2-0-02f1753e8303@suse.cz/T/
[3] https://lore.kernel.org/lkml/32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com/T/#mf14b838c5e0e77f4756d436bac3d8c0447ea4350

Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
---
 include/linux/cpuset.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 875d12598bd2..0ce6ff0d9c9a 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -121,11 +121,6 @@ static inline int cpuset_do_page_mem_spread(void)
 	return task_spread_page(current);
 }
 
-static inline int cpuset_do_slab_mem_spread(void)
-{
-	return task_spread_slab(current);
-}
-
 extern bool current_cpuset_is_being_rebound(void);
 
 extern void rebuild_sched_domains(void);
@@ -264,11 +259,6 @@ static inline int cpuset_do_page_mem_spread(void)
 	return 0;
 }
 
-static inline int cpuset_do_slab_mem_spread(void)
-{
-	return 0;
-}
-
 static inline bool current_cpuset_is_being_rebound(void)
 {
 	return false;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete
  2024-02-29 14:20 [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread() Xiongwei Song
@ 2024-02-29 14:20 ` Xiongwei Song
  2024-02-29 14:30   ` Waiman Long
  2024-02-29 20:29   ` Tejun Heo
  2024-02-29 14:29 ` [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread() Waiman Long
  2024-02-29 20:28 ` Tejun Heo
  2 siblings, 2 replies; 6+ messages in thread
From: Xiongwei Song @ 2024-02-29 14:20 UTC (permalink / raw)
  To: longman, lizefan.x, tj, hannes, corbet
  Cc: vbabka, yosryahmed, rostedt, cl, chengming.zhou, zhengyejian1,
	cgroups, linux-mmc, linux-doc, linux-kernel

We've removed the SLAG allocator, cpuset_do_slab_mem_spread() and
SLAB_MEM_SPREAD, memory_spread_slab is a no-op now. We can mark
memory_spread_slab as obsolete in case someone still wants to use it
after cpuset_do_slab_mem_spread() removed. For more details, please
check [1].

[1] https://lore.kernel.org/lkml/32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com/T/#m8e292e21b00f95a4bb8086371fa7387fa4ea8f60

Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
---
 Documentation/admin-guide/cgroup-v1/cpusets.rst | 2 +-
 kernel/cgroup/cpuset.c                          | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/cgroup-v1/cpusets.rst b/Documentation/admin-guide/cgroup-v1/cpusets.rst
index ae646d621a8a..88d0e7fa2ee0 100644
--- a/Documentation/admin-guide/cgroup-v1/cpusets.rst
+++ b/Documentation/admin-guide/cgroup-v1/cpusets.rst
@@ -179,7 +179,7 @@ files describing that cpuset:
  - cpuset.mem_hardwall flag:  is memory allocation hardwalled
  - cpuset.memory_pressure: measure of how much paging pressure in cpuset
  - cpuset.memory_spread_page flag: if set, spread page cache evenly on allowed nodes
- - cpuset.memory_spread_slab flag: if set, spread slab cache evenly on allowed nodes
+ - cpuset.memory_spread_slab flag: IT'S OBSOLETE. Please don't use it anymore
  - cpuset.sched_load_balance flag: if set, load balance within CPUs on that cpuset
  - cpuset.sched_relax_domain_level: the searching range when migrating tasks
 
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index ba36c073304a..728d06fe9382 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -3897,6 +3897,9 @@ static struct cftype legacy_files[] = {
 	},
 
 	{
+		/* It's obsolete. Please don't use it anymore. We will remove it
+		 * in the future.
+		 */
 		.name = "memory_spread_slab",
 		.read_u64 = cpuset_read_u64,
 		.write_u64 = cpuset_write_u64,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread()
  2024-02-29 14:20 [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread() Xiongwei Song
  2024-02-29 14:20 ` [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete Xiongwei Song
@ 2024-02-29 14:29 ` Waiman Long
  2024-02-29 20:28 ` Tejun Heo
  2 siblings, 0 replies; 6+ messages in thread
From: Waiman Long @ 2024-02-29 14:29 UTC (permalink / raw)
  To: Xiongwei Song, lizefan.x, tj, hannes, corbet
  Cc: vbabka, yosryahmed, rostedt, cl, chengming.zhou, zhengyejian1,
	cgroups, linux-mmc, linux-doc, linux-kernel


On 2/29/24 09:20, Xiongwei Song wrote:
> The SLAB allocator has been removed sine 6.8-rc1 [1], so there is no user
> with SLAB_MEM_SPREAD and cpuset_do_slab_mem_spread(). Then SLAB_MEM_SPREAD
> is marked as unused by [2]. Here we can remove
> cpuset_do_slab_mem_spread(). For more details, please check [3].
>
> [1] https://lore.kernel.org/linux-mm/20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz/
> [2] https://lore.kernel.org/linux-kernel/20240223-slab-cleanup-flags-v2-0-02f1753e8303@suse.cz/T/
> [3] https://lore.kernel.org/lkml/32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com/T/#mf14b838c5e0e77f4756d436bac3d8c0447ea4350
>
> Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
> ---
>   include/linux/cpuset.h | 10 ----------
>   1 file changed, 10 deletions(-)
>
> diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
> index 875d12598bd2..0ce6ff0d9c9a 100644
> --- a/include/linux/cpuset.h
> +++ b/include/linux/cpuset.h
> @@ -121,11 +121,6 @@ static inline int cpuset_do_page_mem_spread(void)
>   	return task_spread_page(current);
>   }
>   
> -static inline int cpuset_do_slab_mem_spread(void)
> -{
> -	return task_spread_slab(current);
> -}
> -
>   extern bool current_cpuset_is_being_rebound(void);
>   
>   extern void rebuild_sched_domains(void);
> @@ -264,11 +259,6 @@ static inline int cpuset_do_page_mem_spread(void)
>   	return 0;
>   }
>   
> -static inline int cpuset_do_slab_mem_spread(void)
> -{
> -	return 0;
> -}
> -
>   static inline bool current_cpuset_is_being_rebound(void)
>   {
>   	return false;
Reviewed-by: Waiman Long <longman@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete
  2024-02-29 14:20 ` [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete Xiongwei Song
@ 2024-02-29 14:30   ` Waiman Long
  2024-02-29 20:29   ` Tejun Heo
  1 sibling, 0 replies; 6+ messages in thread
From: Waiman Long @ 2024-02-29 14:30 UTC (permalink / raw)
  To: Xiongwei Song, lizefan.x, tj, hannes, corbet
  Cc: vbabka, yosryahmed, rostedt, cl, chengming.zhou, zhengyejian1,
	cgroups, linux-mmc, linux-doc, linux-kernel

On 2/29/24 09:20, Xiongwei Song wrote:
> We've removed the SLAG allocator, cpuset_do_slab_mem_spread() and

Typo: "SLAG" --> SLAB.

Other than that,

Acked-by: Waiman Long <longman@redhat.com>

> SLAB_MEM_SPREAD, memory_spread_slab is a no-op now. We can mark
> memory_spread_slab as obsolete in case someone still wants to use it
> after cpuset_do_slab_mem_spread() removed. For more details, please
> check [1].
>
> [1] https://lore.kernel.org/lkml/32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com/T/#m8e292e21b00f95a4bb8086371fa7387fa4ea8f60
>
> Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
> ---
>   Documentation/admin-guide/cgroup-v1/cpusets.rst | 2 +-
>   kernel/cgroup/cpuset.c                          | 3 +++
>   2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v1/cpusets.rst b/Documentation/admin-guide/cgroup-v1/cpusets.rst
> index ae646d621a8a..88d0e7fa2ee0 100644
> --- a/Documentation/admin-guide/cgroup-v1/cpusets.rst
> +++ b/Documentation/admin-guide/cgroup-v1/cpusets.rst
> @@ -179,7 +179,7 @@ files describing that cpuset:
>    - cpuset.mem_hardwall flag:  is memory allocation hardwalled
>    - cpuset.memory_pressure: measure of how much paging pressure in cpuset
>    - cpuset.memory_spread_page flag: if set, spread page cache evenly on allowed nodes
> - - cpuset.memory_spread_slab flag: if set, spread slab cache evenly on allowed nodes
> + - cpuset.memory_spread_slab flag: IT'S OBSOLETE. Please don't use it anymore
>    - cpuset.sched_load_balance flag: if set, load balance within CPUs on that cpuset
>    - cpuset.sched_relax_domain_level: the searching range when migrating tasks
>   
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index ba36c073304a..728d06fe9382 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -3897,6 +3897,9 @@ static struct cftype legacy_files[] = {
>   	},
>   
>   	{
> +		/* It's obsolete. Please don't use it anymore. We will remove it
> +		 * in the future.
> +		 */
>   		.name = "memory_spread_slab",
>   		.read_u64 = cpuset_read_u64,
>   		.write_u64 = cpuset_write_u64,


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread()
  2024-02-29 14:20 [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread() Xiongwei Song
  2024-02-29 14:20 ` [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete Xiongwei Song
  2024-02-29 14:29 ` [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread() Waiman Long
@ 2024-02-29 20:28 ` Tejun Heo
  2 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2024-02-29 20:28 UTC (permalink / raw)
  To: Xiongwei Song
  Cc: longman, lizefan.x, hannes, corbet, vbabka, yosryahmed, rostedt,
	cl, chengming.zhou, zhengyejian1, cgroups, linux-mmc, linux-doc,
	linux-kernel

On Thu, Feb 29, 2024 at 10:20:06PM +0800, Xiongwei Song wrote:
> The SLAB allocator has been removed sine 6.8-rc1 [1], so there is no user
> with SLAB_MEM_SPREAD and cpuset_do_slab_mem_spread(). Then SLAB_MEM_SPREAD
> is marked as unused by [2]. Here we can remove
> cpuset_do_slab_mem_spread(). For more details, please check [3].
> 
> [1] https://lore.kernel.org/linux-mm/20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz/
> [2] https://lore.kernel.org/linux-kernel/20240223-slab-cleanup-flags-v2-0-02f1753e8303@suse.cz/T/
> [3] https://lore.kernel.org/lkml/32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com/T/#mf14b838c5e0e77f4756d436bac3d8c0447ea4350
> 
> Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>

Applied to cgroup/for-6.9.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete
  2024-02-29 14:20 ` [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete Xiongwei Song
  2024-02-29 14:30   ` Waiman Long
@ 2024-02-29 20:29   ` Tejun Heo
  1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2024-02-29 20:29 UTC (permalink / raw)
  To: Xiongwei Song
  Cc: longman, lizefan.x, hannes, corbet, vbabka, yosryahmed, rostedt,
	cl, chengming.zhou, zhengyejian1, cgroups, linux-mmc, linux-doc,
	linux-kernel

Hello,

Applied to cgroup/for-6.9 with some adjustments.

Thanks.

----- 8< -----
From 3ab67a9ce82ff22447b1dad53b49a91d1abbf1ff Mon Sep 17 00:00:00 2001
From: Xiongwei Song <xiongwei.song@windriver.com>
Date: Thu, 29 Feb 2024 22:20:07 +0800
Subject: [PATCH] cgroup/cpuset: Mark memory_spread_slab as obsolete

We've removed the SLAB allocator, cpuset_do_slab_mem_spread() and
SLAB_MEM_SPREAD, memory_spread_slab is a no-op now. We can mark
memory_spread_slab as obsolete in case someone still wants to use it after
cpuset_do_slab_mem_spread() removed. For more details, please check [1].

[1] https://lore.kernel.org/lkml/32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com/T/#m8e292e21b00f95a4bb8086371fa7387fa4ea8f60

tj: Description and cosmetic updates.

Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
 Documentation/admin-guide/cgroup-v1/cpusets.rst | 2 +-
 kernel/cgroup/cpuset.c                          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/cgroup-v1/cpusets.rst b/Documentation/admin-guide/cgroup-v1/cpusets.rst
index ae646d621a8a..7d3415eea05d 100644
--- a/Documentation/admin-guide/cgroup-v1/cpusets.rst
+++ b/Documentation/admin-guide/cgroup-v1/cpusets.rst
@@ -179,7 +179,7 @@ containing (on top of the standard cgroup files) the following
  - cpuset.mem_hardwall flag:  is memory allocation hardwalled
  - cpuset.memory_pressure: measure of how much paging pressure in cpuset
  - cpuset.memory_spread_page flag: if set, spread page cache evenly on allowed nodes
- - cpuset.memory_spread_slab flag: if set, spread slab cache evenly on allowed nodes
+ - cpuset.memory_spread_slab flag: OBSOLETE. Doesn't have any function.
  - cpuset.sched_load_balance flag: if set, load balance within CPUs on that cpuset
  - cpuset.sched_relax_domain_level: the searching range when migrating tasks
 
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index ba36c073304a..c940cf01b148 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -3897,6 +3897,7 @@ static struct cftype legacy_files[] = {
 	},
 
 	{
+		/* obsolete, may be removed in the future */
 		.name = "memory_spread_slab",
 		.read_u64 = cpuset_read_u64,
 		.write_u64 = cpuset_write_u64,
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-29 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 14:20 [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread() Xiongwei Song
2024-02-29 14:20 ` [PATCH 2/2] cgroup/cpuset: Mark memory_spread_slab as obsolete Xiongwei Song
2024-02-29 14:30   ` Waiman Long
2024-02-29 20:29   ` Tejun Heo
2024-02-29 14:29 ` [PATCH 1/2] cgroup/cpuset: Remove cpuset_do_slab_mem_spread() Waiman Long
2024-02-29 20:28 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).