summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2024-09-27 23:02:40 +0300
committerTejun Heo <tj@kernel.org>2024-09-27 23:02:40 +0300
commit568894edbe48f0878f787ed533dc9dbfd09c0fbe (patch)
tree978e049b22c42e08fa61758858b19a2f572727e6 /rust/helpers/helpers.c
parent4269c603cc26df154e0db303a9347e6ec3cc805e (diff)
downloadlinux-568894edbe48f0878f787ed533dc9dbfd09c0fbe.tar.xz
sched_ext: Add scx_cgroup_enabled to gate cgroup operations and fix scx_tg_online()
If the BPF scheduler does not implement ops.cgroup_init(), scx_tg_online() didn't set SCX_TG_INITED which meant that ops.cgroup_exit(), even if implemented, won't be called from scx_tg_offline(). This is because SCX_HAS_OP(cgroupt_init) is used to test both whether SCX cgroup operations are enabled and ops.cgroup_init() exists. Fix it by introducing a separate bool scx_cgroup_enabled to gate cgroup operations and use SCX_HAS_OP(cgroup_init) only to test whether ops.cgroup_init() exists. Make all cgroup operations consistently use scx_cgroup_enabled to test whether cgroup operations are enabled. scx_cgroup_enabled is added instead of using scx_enabled() to ease planned locking updates. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions