mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-27 03:40:23 +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
3be3b91c29
commit
6c129e9b4b
@ -670,17 +670,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