[PATCH v3 0/2] sched_ext: pass the initial cpu.idle state in scx_cgroup_init_args

Tao Cui posted 2 patches 1 month ago
include/linux/sched/ext.h   | 2 +-
kernel/sched/ext/ext.c      | 8 +++++---
kernel/sched/ext/internal.h | 3 +++
kernel/sched/ext/sub.c      | 2 ++
4 files changed, 11 insertions(+), 4 deletions(-)
[PATCH v3 0/2] sched_ext: pass the initial cpu.idle state in scx_cgroup_init_args
Posted by Tao Cui 1 month ago
From: Tao Cui <cuitao@kylinos.cn>

This carries the initial cpu.idle state of a cgroup through
ops.cgroup_init(), which was the only cpu controller knob whose
initial value never reached the BPF scheduler. Patch 1 is the fix;
patch 2 renames tg->scx.idle to tg->scx.sched_idle, suggested in
review, as a separate cleanup.

Changes since v2:

- rename the new field to sched_idle, as a bare "idle" reads as CPU
  idle state in sched_ext (Tejun)
- split the tg->scx.idle rename into 2/2 so 1/2 stays minimal for
  stable backport
- add the Fixes: tag (Andrea)
- regenerate on top of current linux-next, which also resolves the CI
  conflict reported against v2

v2: https://lore.kernel.org/r/20260824142817.568085-1-cui.tao@linux.dev
v1: https://lore.kernel.org/r/20260824133954.561956-1-cui.tao@linux.dev

Tao Cui (2):
  sched_ext: pass the initial cpu.idle state in scx_cgroup_init_args
  sched_ext: rename tg->scx.idle to tg->scx.sched_idle

 include/linux/sched/ext.h   | 2 +-
 kernel/sched/ext/ext.c      | 8 +++++---
 kernel/sched/ext/internal.h | 3 +++
 kernel/sched/ext/sub.c      | 2 ++
 4 files changed, 11 insertions(+), 4 deletions(-)

-- 
2.43.0
Re: [PATCH v3 0/2] sched_ext: pass the initial cpu.idle state in scx_cgroup_init_args
Posted by Tejun Heo 3 weeks, 6 days ago
> Tao Cui (2):
>   sched_ext: pass the initial cpu.idle state in scx_cgroup_init_args
>   sched_ext: rename tg->scx.idle to tg->scx.sched_idle

Applied 1 to sched_ext/for-7.3-fixes and 2 to sched_ext/for-7.4, with
Andrea's Reviewed-by from the cover added to 2 and the subjects
capitalized.

Thanks.

--
tejun
Re: [PATCH v3 0/2] sched_ext: pass the initial cpu.idle state in scx_cgroup_init_args
Posted by Andrea Righi 1 month ago
On Tue, Aug 25, 2026 at 10:35:55AM +0800, Tao Cui wrote:
> From: Tao Cui <cuitao@kylinos.cn>
> 
> This carries the initial cpu.idle state of a cgroup through
> ops.cgroup_init(), which was the only cpu controller knob whose
> initial value never reached the BPF scheduler. Patch 1 is the fix;
> patch 2 renames tg->scx.idle to tg->scx.sched_idle, suggested in
> review, as a separate cleanup.

This looks good to me.

Reviewed-by: Andrea Righi <arighi@nvidia.com>

Thanks,
-Andrea

> 
> Changes since v2:
> 
> - rename the new field to sched_idle, as a bare "idle" reads as CPU
>   idle state in sched_ext (Tejun)
> - split the tg->scx.idle rename into 2/2 so 1/2 stays minimal for
>   stable backport
> - add the Fixes: tag (Andrea)
> - regenerate on top of current linux-next, which also resolves the CI
>   conflict reported against v2
> 
> v2: https://lore.kernel.org/r/20260824142817.568085-1-cui.tao@linux.dev
> v1: https://lore.kernel.org/r/20260824133954.561956-1-cui.tao@linux.dev
> 
> Tao Cui (2):
>   sched_ext: pass the initial cpu.idle state in scx_cgroup_init_args
>   sched_ext: rename tg->scx.idle to tg->scx.sched_idle
> 
>  include/linux/sched/ext.h   | 2 +-
>  kernel/sched/ext/ext.c      | 8 +++++---
>  kernel/sched/ext/internal.h | 3 +++
>  kernel/sched/ext/sub.c      | 2 ++
>  4 files changed, 11 insertions(+), 4 deletions(-)
> 
> -- 
> 2.43.0
>