mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-26 19:30:24 +00:00
scx_rustland_core: consume from the shared DSQ before local DSQ
The shared DSQ is typically used to prioritize tasks and dispatch them on the first CPU available, so consume from the shared DSQ before the local CPU DSQ. Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
parent
6901ddb150
commit
778ee1406f
@ -662,17 +662,17 @@ void BPF_STRUCT_OPS(rustland_dispatch, s32 cpu, struct task_struct *prev)
|
||||
*/
|
||||
bpf_user_ringbuf_drain(&dispatched, handle_dispatched_task, NULL, 0);
|
||||
|
||||
/* Consume all tasks enqueued in the current CPU's DSQ first */
|
||||
bpf_repeat(MAX_ENQUEUED_TASKS) {
|
||||
if (!scx_bpf_consume(cpu_to_dsq(cpu)))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Consume all tasks enqueued in the shared DSQ */
|
||||
bpf_repeat(MAX_ENQUEUED_TASKS) {
|
||||
if (!scx_bpf_consume(SHARED_DSQ))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Consume all tasks enqueued in the current CPU's DSQ first */
|
||||
bpf_repeat(MAX_ENQUEUED_TASKS) {
|
||||
if (!scx_bpf_consume(cpu_to_dsq(cpu)))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user