sched_ext: Remove deprecated SCX_OPS_HAS_CGROUP_WEIGHT flag
Subsystems (3)
PATCH 1/5 sched_ext: Remove deprecated SCX_OPS_HAS_CGROUP_WEIGHT flag
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.
--- 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(-)
kernel/sched/ext.c +0 -3
@@ -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" );
kernel/sched/ext_internal.h +1 -7
@@ -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,
tools/sched_ext/include/scx/enum_defs.autogen.h +0 -1
@@ -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
tools/sched_ext/scx_flatcg.bpf.c +1 -1
@@ -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");
Signature · 1 line
2.43.0
Andrea Righi
reviewerHi,
Quoted 10 lines · zhidao su
From: Su Zhidao <[email protected]>
SCX_OPS_HAS_CGROUP_WEIGHTwas 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 updatescx_flatcgwhich 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
Quoted 72 lines
--- 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(-)kernel/sched/ext.c +0
-3@@ -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" );kernel/sched/ext_internal.h +1
-7@@ -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,tools/sched_ext/include/scx/enum_defs.autogen.h +0
-1@@ -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 tools/sched_ext/scx_flatcg.bpf.c +1
-1@@ -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");Signature · 1 line
2.43.0
From: Su Zhidao <[email protected]>
Quoted 5 lines · Andrea Righi
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 for the feedback. Apologies for the inconvenience.
I resent the series as a proper patch thread with cover letter:
Subject: [PATCH 0/5] sched_ext: bypass state machine cleanup and selftest
Message-ID: <[email protected]>
Sorry for the noise.
Signature · 1 line
Su Zhidao