sched/fair: Default to false in test_idle_cores()
authorAbel Wu <wuyun.abel@bytedance.com>
Wed, 7 Sep 2022 11:19:59 +0000 (19:19 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 7 Sep 2022 19:53:47 +0000 (21:53 +0200)
commit398ba2b0cc0a43964fe3d2dd19cb2a478f1f220b
tree247303ef4f441f2b687bfffec87af5d6984701d6
parent8eeeed9c4a791f0d1f2ea830eb75a4246c117ae2
sched/fair: Default to false in test_idle_cores()

It's uncertain whether idle cores exist or not if shared sched-
domains are not ready, so returning "no idle cores" usually
makes sense.

While __update_idle_core() is an exception, it checks status
of this core and set hint to shared sched-domain if necessary.
So the whole logic of this function depends on the existence
of shared sched-domain, and can certainly bail out early if
it is not available.

It's somehow a little tricky, and as Josh suggested that it
should be transient while the domain isn't ready. So remove
the self-defined default value to make things more clearer.

Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Josh Don <joshdon@google.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Link: https://lore.kernel.org/r/20220907112000.1854-5-wuyun.abel@bytedance.com
kernel/sched/fair.c