summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Loehle <christian.loehle@arm.com>2026-09-17 16:39:15 +0100
committerPeter Zijlstra <peterz@infradead.org>2026-09-25 12:45:58 +0200
commitc9ce69fc43bd07dbed9d23a504e56f84604ecf42 (patch)
tree52e70501a6805608547805ffca4017d8ba878d4f /tools/lib/python
parentabe440b3770fce8eb8ee92a563dfb55a7b9a1c0e (diff)
sched/fair: Randomize equally shallow slow-path candidates
Picking the first eligible idle CPU leaves a scan-order bias. Concurrent slow-path selectors can choose the same CPU before either task is enqueued. Use reservoir sampling for equal exit latencies, resetting the candidate count when a shallower candidate appears. Use the per-CPU scheduler PRNG and reciprocal_scale() to avoid variable division or a second scan. Use a u64 latency key with U64_MAX for unpublished states. Published states take precedence; when none are found, sample among the idle CPUs without a published state. Signed-off-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org> Link: https://patch.msgid.link/20260917153915.1563875-3-christian.loehle@arm.com
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions