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 | e7a6395a889a82edb1cdcebc2c66646aca454658 (patch) | |
tree | 6f77712baafb6f09530c16a1b873983a9231729a /tools/perf/scripts/python/task-analyzer.py | |
parent | fd0cf516956a0aaa4d899383ee5c2ff191418b5f (diff) |
sched_ext: Make scx_bpf_reenqueue_local() skip tasks that are being migrated
When a running task is migrated to another CPU, the stop_task is used to
preempt the running task and migrate it. This, expectedly, invokes
ops.cpu_release(). If the BPF scheduler then calls
scx_bpf_reenqueue_local(), it re-enqueues all tasks on the local DSQ
including the task which is being migrated.
This creates an unnecessary re-enqueue of a task which is about to be
deactivated and re-activated for migration anyway. It can also cause
confusion for the BPF scheduler as scx_bpf_task_cpu() of the task and its
allowed CPUs may not agree while migration is pending.
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/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions