sched/numa: Stop an exhastive search if a reasonable swap candidate or idle CPU is...
authorMel Gorman <mgorman@techsingularity.net>
Mon, 24 Feb 2020 09:52:23 +0000 (09:52 +0000)
committerIngo Molnar <mingo@kernel.org>
Mon, 24 Feb 2020 10:36:40 +0000 (11:36 +0100)
commita0f03b617c3b2644d3d47bf7d9e60aed01bd5b10
tree4e2326bb2ff040ad2139c5fd0c6c3aa143c67a81
parent88cca72c9673e631b63eca7a1dba4a9722a3f414
sched/numa: Stop an exhastive search if a reasonable swap candidate or idle CPU is found

When domains are imbalanced or overloaded a search of all CPUs on the
target domain is searched and compared with task_numa_compare. In some
circumstances, a candidate is found that is an obvious win.

 o A task can move to an idle CPU and an idle CPU is found
 o A swap candidate is found that would move to its preferred domain

This patch terminates the search when either condition is met.

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Phil Auld <pauld@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Link: https://lore.kernel.org/r/20200224095223.13361-14-mgorman@techsingularity.net
kernel/sched/fair.c