Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scx_simple: re-add __COMPAT_scx_bpf_switch_all() #298

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

arighi
Copy link
Contributor

@arighi arighi commented May 20, 2024

Although newer kernels default to switching-all, some users might still be using the scheduler with older kernels.

Therefore, ensure all tasks are moved to the SCHED_EXT class by calling __COMPAT_scx_bpf_switch_all() during init, so that scx_simple can still operate on these older kernels as well.

Fixes: cf66e58 ("Sync from kernel (670bdab6073)")

Although newer kernels default to switching-all, some users might still
be using the scheduler with older kernels.

Therefore, ensure all tasks are moved to the SCHED_EXT class by calling
__COMPAT_scx_bpf_switch_all() during init, so that scx_simple can still
operate on these older kernels as well.

Fixes: cf66e58 ("Sync from kernel (670bdab6073)")
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
@vax-r
Copy link
Contributor

vax-r commented May 20, 2024

Mind if I ask what's the meaning and usage of switching-all ?
Doesn't the scheduler be chagned to scx_simple when scx_simple 's bpf program loaded into the kernel ?

@arighi
Copy link
Contributor Author

arighi commented May 20, 2024

@vax-r it is possible to apply a scheduler only to the tasks that explicitly migrate to the SCHED_EXT class via sched_setscheduler(), or to all tasks (that is the default behavior now).

@arighi arighi requested a review from htejun May 20, 2024 16:42
@htejun htejun merged commit fcc7c37 into main May 20, 2024
1 check passed
@htejun htejun deleted the simple-switch-all branch May 20, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants