Re: [PATCH 1/9] cgroup/cpuset-v1: Add deprecation warnings to sched_load_balance and memory_pressure_enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/4/25 10:37 AM, Michal Koutný wrote:
These two v1 feature have analogues in cgroup v2.

Signed-off-by: Michal Koutný <mkoutny@xxxxxxxx>
---
  kernel/cgroup/cpuset-v1.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/kernel/cgroup/cpuset-v1.c b/kernel/cgroup/cpuset-v1.c
index 25c1d7b77e2f2..3e81ac76578c7 100644
--- a/kernel/cgroup/cpuset-v1.c
+++ b/kernel/cgroup/cpuset-v1.c
@@ -430,12 +430,14 @@ static int cpuset_write_u64(struct cgroup_subsys_state *css, struct cftype *cft,
  		retval = cpuset_update_flag(CS_MEM_HARDWALL, cs, val);
  		break;
  	case FILE_SCHED_LOAD_BALANCE:
+		pr_warn_once("cpuset.%s is deprecated, use cpus.partition instead\n", cft->name);
Should you use the full name "cpuset.cpus.partition" instead?
  		retval = cpuset_update_flag(CS_SCHED_LOAD_BALANCE, cs, val);
  		break;
  	case FILE_MEMORY_MIGRATE:
  		retval = cpuset_update_flag(CS_MEMORY_MIGRATE, cs, val);
  		break;
  	case FILE_MEMORY_PRESSURE_ENABLED:
+		pr_warn_once("cpuset.%s is deprecated, use memory.pressure instead\n", cft->name);

memory.pressure depends on CONFIG_PSI, so it may not available in some cases. My suggestion is to add a "if available" suffix.

I do have some concern with the use of pr_warn*() because some users may attempt to use the panic_on_warn command line option.

Cheers,
Longman





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux