diff options
author | Tejun Heo <tj@kernel.org> | 2024-07-09 12:30:26 -1000 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2024-07-09 12:30:26 -1000 |
commit | fd0cf516956a0aaa4d899383ee5c2ff191418b5f (patch) | |
tree | a0077315d98419324d066d719ebeb553a8b733fa /tools/perf/scripts/python/syscall-counts.py | |
parent | 6fbd643318a1a5f3caea7f94bfe035efbb293ddb (diff) |
sched_ext: Reimplement scx_bpf_reenqueue_local()
scx_bpf_reenqueue_local() is used to re-enqueue tasks on the local DSQ from
ops.cpu_release(). Because the BPF scheduler may dispatch tasks to the same
local DSQ, to avoid processing the same tasks repeatedly, it first takes the
number of queued tasks and processes the task at the head of the queue that
number of times.
This is incorrect as a task can be dispatched to the same local DSQ with
SCX_ENQ_HEAD. Such a task will be processed repeatedly until the count is
exhausted and the succeeding tasks won't be processed at all.
Fix it by first moving all candidate tasks to a private list and then
processing that list. While at it, remove the WARNs. They're rather
superflous as later steps will check them anyway.
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 245254f7081d ("sched_ext: Implement sched_ext_ops.cpu_acquire/release()")
Acked-by: David Vernet <void@manifault.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions