diff options
| author | Tao Cui <cuitao@kylinos.cn> | 2026-09-01 20:43:47 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-09-01 21:05:32 -1000 |
| commit | 29871903f3a38e75e896f9a644713859490cb85f (patch) | |
| tree | d5ba5adca47f5aad588f82b432277eac99285e44 /scripts/Makefile.thinlto | |
| parent | 93d88ac4a448f200d18d1d71de0074b8e716bbee (diff) | |
| download | linux-next-29871903f3a38e75e896f9a644713859490cb85f.tar.gz linux-next-29871903f3a38e75e896f9a644713859490cb85f.zip | |
sched_ext: Don't deliver duplicate ops.cgroup_set_idle() for same value
ops.cgroup_set_idle() is documented to be invoked when a cgroup
transitions between idle and non-idle states, and scx_group_set_weight()
already skips value-preserving writes. scx_group_set_idle() delivers
every write unconditionally, so rewriting an already-correct cpu.idle
value feeds the BPF scheduler a transition callback each time, which
toggle- or accounting-based schedulers miscount. Mirror the weight
guard and only deliver on an actual change.
Verified with a probe scheduler printing each callback: rewriting
cpu.idle=1 twice on an already-idle cgroup delivered two callbacks
before and none after.
Fixes: 347ed2d566da ("sched/ext: Implement cgroup_set_idle() callback")
Link: https://lore.kernel.org/r/b53c61a1-4d7d-4232-941f-d48b0563d4ed@linux.dev
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
