sched/numa: Stop an exhastive search if an idle core is found
authorHao Jia <jiahao.os@bytedance.com>
Fri, 16 Dec 2022 06:24:05 +0000 (14:24 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 27 Dec 2022 11:52:16 +0000 (12:52 +0100)
commitfeaed76376fd612b9450ad1251aec20a63ccfe92
tree50aa3a24d6cc6ead328224a09fa179d35ac2bf8f
parent904cbab71dda1689d41a240541179f21ff433c40
sched/numa: Stop an exhastive search if an idle core is found

In update_numa_stats() we try to find an idle cpu on the NUMA node,
preferably an idle core. we can stop looking for the next idle core
or idle cpu after finding an idle core. But we can't stop the
whole loop of scanning the CPU, because we need to calculate
approximate NUMA stats at a point in time. For example,
the src and dst nr_running is needed by task_numa_find_cpu().

Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Link: https://lore.kernel.org/r/20221216062406.7812-2-jiahao.os@bytedance.com
kernel/sched/fair.c