]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/ext: Implement cgroup_set_idle() callback
authorzhidao su <suzhidao@xiaomi.com>
Sat, 11 Oct 2025 07:16:51 +0000 (15:16 +0800)
committerTejun Heo <tj@kernel.org>
Tue, 14 Oct 2025 20:17:33 +0000 (10:17 -1000)
commit347ed2d566dabb06c7970fff01129c4f59995ed6
tree59f8cc27c12a3e93ba6fb1d73957c31a95c83a76
parentbd7143e74e8ce0b35b32fa76e92d78e52cb12883
sched/ext: Implement cgroup_set_idle() callback

Implement the missing cgroup_set_idle() callback that was marked as a
TODO. This allows BPF schedulers to be notified when a cgroup's idle
state changes, enabling them to adjust their scheduling behavior
accordingly.

The implementation follows the same pattern as other cgroup callbacks
like cgroup_set_weight() and cgroup_set_bandwidth(). It checks if the
BPF scheduler has implemented the callback and invokes it with the
appropriate parameters.

Fixes a spelling error in the cgroup_set_bandwidth() documentation.

tj: s/scx_cgroup_rwsem/scx_cgroup_ops_rwsem/ to fix build breakage.

Signed-off-by: zhidao su <soolaugust@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/sched/ext.h
kernel/sched/ext.c
kernel/sched/ext_internal.h