Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scheds/rust/scx_layered/src/bpf/main.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,14 @@ static bool keep_running(struct cpu_ctx *cpuc, struct task_struct *p,
if (scx_bpf_dsq_nr_queued(cpuc->hi_fb_dsq_id))
goto no;

/*
* Anything already dispatched to this CPU's local DSQ should run.
* Consider for example pcpu kthreads that are dispatched to the local
* DSQ and which won't be detected by antistall.
*/
if (scx_bpf_dsq_nr_queued(SCX_DSQ_LOCAL_ON | cpuc->cpu))
goto no;

/* @p has fully consumed its slice and still wants to run */
cpuc->ran_current_for += layer->slice_ns;

Expand Down
Loading