mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] sched/fair: Randomize equally shallow idle CPU picks
@ 2026-09-16 10:01 Christian Loehle
  2026-09-16 10:01 ` [PATCH 1/2] sched/fair: Drop idle recency from slow-path CPU selection Christian Loehle
  2026-09-16 10:01 ` [PATCH 2/2] sched/fair: Randomize equally shallow slow-path candidates Christian Loehle
  0 siblings, 2 replies; 13+ messages in thread
From: Christian Loehle @ 2026-09-16 10:01 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
  Cc: Dietmar Eggemann, Steven Rostedt, Valentin Schneider,
	K Prateek Nayak, Beata Michalska, Elif Topuz, Rafael J . Wysocki,
	Daniel Lezcano, Shubhang Kaushik, Christoph Lameter,
	linux-kernel, linux-pm, Christian Loehle

Concurrent slow-path selectors can converge on the same idle CPU before
either task is enqueued. Remove the idle-recency preference and randomize
equal-latency choices in a single scan.

The testing platform 160-CPU, dual-socket Altra has unusually large 80-CPU
candidate groups at NUMA level, making this particularly prone to stale
idle picks.

Median stress-ng throughput (bogo ops/s):

  --fork  --fork-max      Baseline       Patched    Change
  ------------------------------------------------------
       1           1        779.19        811.38    +4.13%
       8           1       2958.32       2960.18    +0.06%
      16           1       5070.95       5247.63    +3.48%
      16           4       7692.64       7831.60    +1.81%
      32           1       8662.82       8643.39    -0.22%
      64           1      11880.47      12096.69    +1.82%

Separate instrumented runs observed lower conditional stale-pick rates,
i.e. a busy candidate at final return:

Workload                Baseline       Patched
----------------------------------------------
fork, 32 creators          0.771%       0.407%
fork, 64 creators          1.242%       0.672%

Christian Loehle (2):
  sched/fair: Drop idle recency from slow-path CPU selection
  sched/fair: Randomize equally shallow slow-path candidates

 kernel/sched/fair.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)


base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
-- 
2.34.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-09-17 14:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 10:01 [PATCH 0/2] sched/fair: Randomize equally shallow idle CPU picks Christian Loehle
2026-09-16 10:01 ` [PATCH 1/2] sched/fair: Drop idle recency from slow-path CPU selection Christian Loehle
2026-09-17 13:28   ` Vincent Guittot
2026-09-16 10:01 ` [PATCH 2/2] sched/fair: Randomize equally shallow slow-path candidates Christian Loehle
2026-09-16 11:06   ` Kayra Cizmeci
2026-09-16 11:10     ` Christian Loehle
2026-09-16 11:12   ` Christian Loehle
2026-09-16 11:46     ` Kayra Cizmeci
2026-09-16 19:43   ` Shubhang
2026-09-17  7:47     ` Christian Loehle
2026-09-17  9:58       ` Christian Loehle
2026-09-17 14:02         ` Vincent Guittot
2026-09-17 14:08   ` Vincent Guittot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®