From eed338ef254cc88b255dd087203862417eb5723d Mon Sep 17 00:00:00 2001 From: David Vernet Date: Tue, 16 Apr 2024 11:09:44 -0500 Subject: [PATCH] simple: Invoke __COMPAT_scx_bpf_switch_all(); scx_simple no longer supports running in "partial" mode, with only certain tasks usig scx_simple. When this option was removed, we also removed the call to scx_bpf_switch_all(); While switching-all is the default behavior for newer kernels, let's add __COMPAT_scx_bpf_switch_all() so that scx_simple can work on older kernels as well. Signed-off-by: David Vernet --- scheds/c/scx_simple.bpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scheds/c/scx_simple.bpf.c b/scheds/c/scx_simple.bpf.c index 535fe52..edb323e 100644 --- a/scheds/c/scx_simple.bpf.c +++ b/scheds/c/scx_simple.bpf.c @@ -129,6 +129,7 @@ void BPF_STRUCT_OPS(simple_enable, struct task_struct *p) s32 BPF_STRUCT_OPS_SLEEPABLE(simple_init) { + __COMPAT_scx_bpf_switch_all(); return scx_bpf_create_dsq(SHARED_DSQ, -1); }