[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8b8f0f99-6d42-4c6f-9c43-d0224bdedf9e@redhat.com>
Date: Tue, 4 Mar 2025 11:19:00 -0500
From: Waiman Long <llong@...hat.com>
To: Michal Koutný <mkoutny@...e.com>,
cgroups@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Tejun Heo <tj@...nel.org>, Josef Bacik <josef@...icpanda.com>,
Jens Axboe <axboe@...nel.dk>, Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH 1/9] cgroup/cpuset-v1: Add deprecation warnings to
sched_load_balance and memory_pressure_enabled
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@...e.com>
> ---
> 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
Powered by blists - more mailing lists