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_rustland: never use a time slice that exceeds the default value #336

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

arighi
Copy link
Contributor

@arighi arighi commented Jun 6, 2024

Make sure to never assign a time slice longer than the default time slice, that can be used as an upper limit.

This seems to prevent potential stall conditions (reported by the CachyOS community) when running CPU-intensive workloads, such as:

[ 68.062813] sched_ext: BPF scheduler "rustland" errored, disabling
[ 68.062831] sched_ext: runnable task stall (ollama_llama_se[3312] failed to run for 5.180s)
[ 68.062832] scx_watchdog_workfn+0x154/0x1e0
[ 68.062837] process_one_work+0x18e/0x350
[ 68.062839] worker_thread+0x2fa/0x490
[ 68.062841] kthread+0xd2/0x100
[ 68.062842] ret_from_fork+0x34/0x50
[ 68.062844] ret_from_fork_asm+0x1a/0x30

Fixes: 6f4cd85 ("scx_rustland: introduce virtual time slice")
Tested-by: SoulHarsh007 [email protected]
Tested-by: Piotr Gorski [email protected]

Make sure to never assign a time slice longer than the default time
slice, that can be used as an upper limit.

This seems to prevent potential stall conditions (reported by the
CachyOS community) when running CPU-intensive workloads, such as:

 [   68.062813] sched_ext: BPF scheduler "rustland" errored, disabling
 [   68.062831] sched_ext: runnable task stall (ollama_llama_se[3312] failed to run for 5.180s)
 [   68.062832]    scx_watchdog_workfn+0x154/0x1e0
 [   68.062837]    process_one_work+0x18e/0x350
 [   68.062839]    worker_thread+0x2fa/0x490
 [   68.062841]    kthread+0xd2/0x100
 [   68.062842]    ret_from_fork+0x34/0x50
 [   68.062844]    ret_from_fork_asm+0x1a/0x30

Fixes: 6f4cd85 ("scx_rustland: introduce virtual time slice")
Tested-by: SoulHarsh007 <[email protected]>
Tested-by: Piotr Gorski <[email protected]>
Signed-off-by: Andrea Righi <[email protected]>
Copy link
Contributor

@sirlucjan sirlucjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it seems that everything works as it should.

@arighi arighi merged commit def1ad2 into main Jun 6, 2024
1 check passed
@arighi arighi deleted the rustland-max-time-slice-limit branch June 6, 2024 16:34
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