public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sched/fair: Reduce nohz_idle_balance CPU overhead on large systems
@ 2026-04-21  5:06 Imran Khan
  2026-04-21  5:06 ` [PATCH 1/2] sched/fair: scale nohz.next_balance according to number of idle CPUs Imran Khan
  2026-04-21  5:06 ` [PATCH 2/2] sched/fair: distribute nohz ILB work across " Imran Khan
  0 siblings, 2 replies; 9+ messages in thread
From: Imran Khan @ 2026-04-21  5:06 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, vschneid,
	linux-kernel

On large systems (700+ CPUs, 350+ CPUs in root sched_domain/cpuset),
nohz idle balancing can consume significant amount of CPU due to two
independent problems.

First, due to large number of CPUs there is a very good chance of
nohz.next_balance always being same or very close to current jiffies,
causing nohz idle balance work to happen on almost each tick.

Second, find_new_ilb() uses for_each_cpu_and() to iterate idle_cpus_mask
from the lowest bit, so the lowest-numbered idle CPU in the cpuset bears
the full burden of nohz ILB work and most of the times it's the same CPU.
Again on large scale systems this work becomes significant and unfairly
consumes cycles of same CPU most of the times.

Patch 1 addresses the first issue by advancing nohz.next_balance based on
the number of idle CPUs and patch 2 addresses the second issue by
distributing the nohz ILB work across eligible idle CPUs.

Imran Khan (2):
  sched/fair: scale nohz.next_balance according to number of idle CPUs.
  sched/fair: distribute nohz ILB work across idle CPUs.

 kernel/sched/fair.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)


base-commit: 591cd656a1bf5ea94a222af5ef2ee76df029c1d2
-- 
2.34.1


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

end of thread, other threads:[~2026-04-28 15:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21  5:06 [PATCH 0/2] sched/fair: Reduce nohz_idle_balance CPU overhead on large systems Imran Khan
2026-04-21  5:06 ` [PATCH 1/2] sched/fair: scale nohz.next_balance according to number of idle CPUs Imran Khan
2026-04-21 17:30   ` Shrikanth Hegde
2026-04-22  7:54   ` Vincent Guittot
2026-04-22 16:13     ` imran.f.khan
2026-04-24  9:46       ` Vincent Guittot
2026-04-28 10:52         ` imran.f.khan
2026-04-28 15:06           ` Vincent Guittot
2026-04-21  5:06 ` [PATCH 2/2] sched/fair: distribute nohz ILB work across " Imran Khan

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