diff options
author | Tejun Heo <tj@kernel.org> | 2024-08-07 13:15:19 -1000 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2024-08-13 09:08:50 -1000 |
commit | 89909296a51e792f296e52e104a04aed0cb7a9e9 (patch) | |
tree | 4df4f1ae59eb8df9103b6b621e6ef671f1b0b7c4 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | 33d031ec12105e4e4589dc5f50511a666d6f4b4f (diff) |
sched_ext: Don't use double locking to migrate tasks across CPUs
consume_remote_task() and dispatch_to_local_dsq() use
move_task_to_local_dsq() to migrate the task to the target CPU. Currently,
move_task_to_local_dsq() expects the caller to lock both the source and
destination rq's. While this may save a few lock operations while the rq's
are not contended, under contention, the double locking can exacerbate the
situation significantly (refer to the linked message below).
Update the migration path so that double locking is not used.
move_task_to_local_dsq() now expects the caller to be locking the source rq,
drops it and then acquires the destination rq lock. Code is simpler this way
and, on a 2-way NUMA machine w/ Xeon Gold 6138, 'hackbench 100 thread 5000`
shows ~3% improvement with scx_simple.
Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20240806082716.GP37996@noisy.programming.kicks-ass.net
Acked-by: David Vernet <void@manifault.com>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions