From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 sched_ext/for-6.15-fixes] sched_ext: Mark SCX_OPS_HAS_CGROUP_WEIGHT for deprecation
Date: Tue, 8 Apr 2025 20:41:58 +0200 [thread overview]
Message-ID: <Z_Vt9kWib7E5bH9K@gpd3> (raw)
In-Reply-To: <Z_VrcMkl2w7EIPC0@slm.duckdns.org>
On Tue, Apr 08, 2025 at 08:31:12AM -1000, Tejun Heo wrote:
> SCX_OPS_HAS_CGROUP_WEIGHT was only used to suppress the missing cgroup
> weight support warnings. Now that the warnings are removed, the flag doesn't
> do anything. Mark it for deprecation and remove its usage from scx_flatcg.
>
> v2: Actually include the scx_flatcg update.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Suggested-by: Andrea Righi <arighi@nvidia.com>
Looks good, thanks!
Reviewed-by: Andrea Righi <arighi@nvidia.com>
-Andrea
> ---
> kernel/sched/ext.c | 5 ++++-
> tools/sched_ext/scx_flatcg.bpf.c | 2 +-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 21eaf081d336..fdbf249d1c68 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -163,7 +163,7 @@ enum scx_ops_flags {
> /*
> * CPU cgroup support flags
> */
> - SCX_OPS_HAS_CGROUP_WEIGHT = 1LLU << 16, /* cpu.weight */
> + SCX_OPS_HAS_CGROUP_WEIGHT = 1LLU << 16, /* DEPRECATED, will be removed on 6.18 */
>
> SCX_OPS_ALL_FLAGS = SCX_OPS_KEEP_BUILTIN_IDLE |
> SCX_OPS_ENQ_LAST |
> @@ -5213,6 +5213,9 @@ static int validate_ops(const struct sched_ext_ops *ops)
> return -EINVAL;
> }
>
> + if (ops->flags & SCX_OPS_HAS_CGROUP_WEIGHT)
> + pr_warn("SCX_OPS_HAS_CGROUP_WEIGHT is deprecated and a noop\n");
> +
> return 0;
> }
>
> diff --git a/tools/sched_ext/scx_flatcg.bpf.c b/tools/sched_ext/scx_flatcg.bpf.c
> index 2c720e3ecad5..fdc7170639e6 100644
> --- a/tools/sched_ext/scx_flatcg.bpf.c
> +++ b/tools/sched_ext/scx_flatcg.bpf.c
> @@ -950,5 +950,5 @@ SCX_OPS_DEFINE(flatcg_ops,
> .cgroup_move = (void *)fcg_cgroup_move,
> .init = (void *)fcg_init,
> .exit = (void *)fcg_exit,
> - .flags = SCX_OPS_HAS_CGROUP_WEIGHT | SCX_OPS_ENQ_EXITING,
> + .flags = SCX_OPS_ENQ_EXITING,
> .name = "flatcg");
next prev parent reply other threads:[~2025-04-08 18:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 23:20 [PATCH sched_ext/for-6.16] sched_ext: Remove cpu.weight / cpu.idle unimplemented warnings Tejun Heo
2025-04-08 1:23 ` Changwoo Min
2025-04-08 7:58 ` Andrea Righi
2025-04-08 18:12 ` [PATCH sched_ext/for-6.15-fixes] sched_ext: Mark SCX_OPS_HAS_CGROUP_WEIGHT for deprecation Tejun Heo
2025-04-08 18:28 ` Andrea Righi
2025-04-08 18:29 ` Tejun Heo
2025-04-08 18:31 ` [PATCH v2 " Tejun Heo
2025-04-08 18:41 ` Andrea Righi [this message]
2025-04-08 18:54 ` Tejun Heo
2025-04-08 17:55 ` [PATCH sched_ext/for-6.16] sched_ext: Remove cpu.weight / cpu.idle unimplemented warnings Tejun Heo
2025-04-08 18:01 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_Vt9kWib7E5bH9K@gpd3 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=void@manifault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.