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 <void@manifault.com>
This commit is contained in:
David Vernet 2024-04-16 11:09:44 -05:00
parent b9d57e85b5
commit eed338ef25
No known key found for this signature in database
GPG Key ID: 59E4B86965C4F364

View File

@ -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);
}