Hi,

On Fri, Mar 06, 2026 at 08:48:57PM +0800, zhidao su wrote:
> From: Su Zhidao <[email protected]>
> 
> 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 <[email protected]>

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 via email to