public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: zhidao su <soolaugust@gmail.com>
Cc: tj@kernel.org, sched-ext@lists.linux.dev,
	linux-kernel@vger.kernel.org, void@manifault.com,
	changwoo@igalia.com, linux-kselftest@vger.kernel.org,
	Su Zhidao <suzhidao@xiaomi.com>
Subject: Re: [PATCH 1/5] sched_ext: Remove deprecated SCX_OPS_HAS_CGROUP_WEIGHT flag
Date: Fri, 6 Mar 2026 15:01:49 +0100	[thread overview]
Message-ID: <aareTeuAos9-Mg2c@gpd4> (raw)
In-Reply-To: <20260306124901.2653465-1-suzhidao@xiaomi.com>

Hi,

On Fri, Mar 06, 2026 at 08:48:57PM +0800, zhidao su wrote:
> From: Su Zhidao <suzhidao@xiaomi.com>
> 
> SCX_OPS_HAS_CGROUP_WEIGHT was deprecated in 6.15 with a comment
> 'will be removed on 6.18'. Now that we are at 6.18, remove it.
> 
> The flag was a no-op and only triggered a pr_warn() on use. Remove
> the flag definition, the warning, and update scx_flatcg which was
> the last in-tree user.
> 
> Signed-off-by: Su Zhidao <suzhidao@xiaomi.com>

Please, when sending multiple patches, group them together in the same
email thread with cover letter email, otherwise it's very unpractical to
apply and review them.

See Documentation/process/submitting-patches.rst.

Thanks,
-Andrea

> ---
>  kernel/sched/ext.c                              | 3 ---
>  kernel/sched/ext_internal.h                     | 8 +-------
>  tools/sched_ext/include/scx/enum_defs.autogen.h | 1 -
>  tools/sched_ext/scx_flatcg.bpf.c                | 2 +-
>  4 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index c4ccd685259f..56ff5874af94 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -5061,9 +5061,6 @@ static int validate_ops(struct scx_sched *sch, 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");
> -
>  	if (ops->cpu_acquire || ops->cpu_release)
>  		pr_warn("ops->cpu_acquire/release() are deprecated, use sched_switch TP instead\n");
>  
> diff --git a/kernel/sched/ext_internal.h b/kernel/sched/ext_internal.h
> index bd26811fea99..3c86c53e1975 100644
> --- a/kernel/sched/ext_internal.h
> +++ b/kernel/sched/ext_internal.h
> @@ -174,19 +174,13 @@ enum scx_ops_flags {
>  	 */
>  	SCX_OPS_BUILTIN_IDLE_PER_NODE	= 1LLU << 6,
>  
> -	/*
> -	 * CPU cgroup support flags
> -	 */
> -	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 |
>  					  SCX_OPS_ENQ_EXITING |
>  					  SCX_OPS_ENQ_MIGRATION_DISABLED |
>  					  SCX_OPS_ALLOW_QUEUED_WAKEUP |
>  					  SCX_OPS_SWITCH_PARTIAL |
> -					  SCX_OPS_BUILTIN_IDLE_PER_NODE |
> -					  SCX_OPS_HAS_CGROUP_WEIGHT,
> +					  SCX_OPS_BUILTIN_IDLE_PER_NODE,
>  
>  	/* high 8 bits are internal, don't include in SCX_OPS_ALL_FLAGS */
>  	__SCX_OPS_INTERNAL_MASK		= 0xffLLU << 56,
> diff --git a/tools/sched_ext/include/scx/enum_defs.autogen.h b/tools/sched_ext/include/scx/enum_defs.autogen.h
> index dcc945304760..80c885f781ba 100644
> --- a/tools/sched_ext/include/scx/enum_defs.autogen.h
> +++ b/tools/sched_ext/include/scx/enum_defs.autogen.h
> @@ -91,7 +91,6 @@
>  #define HAVE_SCX_OPS_SWITCH_PARTIAL
>  #define HAVE_SCX_OPS_ENQ_MIGRATION_DISABLED
>  #define HAVE_SCX_OPS_ALLOW_QUEUED_WAKEUP
> -#define HAVE_SCX_OPS_HAS_CGROUP_WEIGHT
>  #define HAVE_SCX_OPS_ALL_FLAGS
>  #define HAVE_SCX_OPSS_NONE
>  #define HAVE_SCX_OPSS_QUEUEING
> diff --git a/tools/sched_ext/scx_flatcg.bpf.c b/tools/sched_ext/scx_flatcg.bpf.c
> index 0e785cff0f24..a8a9234bb41e 100644
> --- a/tools/sched_ext/scx_flatcg.bpf.c
> +++ b/tools/sched_ext/scx_flatcg.bpf.c
> @@ -960,5 +960,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");
> -- 
> 2.43.0
> 

  reply	other threads:[~2026-03-06 14:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 12:48 [PATCH 1/5] sched_ext: Remove deprecated SCX_OPS_HAS_CGROUP_WEIGHT flag zhidao su
2026-03-06 14:01 ` Andrea Righi [this message]
2026-03-06 14:06   ` zhidao su
  -- strict thread matches above, loose matches on Subject: below --
2026-03-06 14:03 [PATCH 0/5] sched_ext: bypass state machine cleanup and selftest zhidao su
2026-03-06 14:03 ` [PATCH 1/5] sched_ext: Remove deprecated SCX_OPS_HAS_CGROUP_WEIGHT flag zhidao su

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=aareTeuAos9-Mg2c@gpd4 \
    --to=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=soolaugust@gmail.com \
    --cc=suzhidao@xiaomi.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox