]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/fair: Add SIS_UTIL support to select_idle_capacity()
authorK Prateek Nayak <kprateek.nayak@amd.com>
Sat, 9 May 2026 18:07:29 +0000 (20:07 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 19 May 2026 10:17:39 +0000 (12:17 +0200)
commit61ea17a63719bac51e1bc50eb39fc637f0fdc06e
tree49483f864451fa7c89d7b66ca6847ffb57da6ab6
parentbf6aa722198d3c06e4236e8c5a480f30a64e1513
sched/fair: Add SIS_UTIL support to select_idle_capacity()

Add to select_idle_capacity() the same SIS_UTIL-controlled idle-scan
mechanism, already used by select_idle_cpu(): when sched_feat(SIS_UTIL)
is enabled and the LLC domain has sched_domain_shared data, derive the
per-attempt scan limit from sd->shared->nr_idle_scan.

That bounds the walk on large LLCs: once nr_idle_scan is exhausted,
return the best CPU seen so far. The early exit is gated on
!has_idle_core so an active idle-core search (SMT with idle cores
reported by test_idle_cores()) isn't cut short before it gets a chance
to find one.

Co-developed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://patch.msgid.link/20260509180955.1840064-6-arighi@nvidia.com
kernel/sched/fair.c