]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Merge select_idle_core/cpu()
authorMel Gorman <mgorman@techsingularity.net>
Wed, 27 Jan 2021 13:52:03 +0000 (13:52 +0000)
committerIngo Molnar <mingo@kernel.org>
Wed, 17 Feb 2021 13:07:25 +0000 (14:07 +0100)
commit0231d62bf7fde7f0b1f7d7710458ec753456c9c3
tree099925bb3e479747b50765ca341b0862806fd5c6
parentabf3195fef2b59c772bb4cfc4e04b42a2e38910c
sched/fair: Merge select_idle_core/cpu()

Both select_idle_core() and select_idle_cpu() do a loop over the same
cpumask. Observe that by clearing the already visited CPUs, we can
fold the iteration and iterate a core at a time.

All we need to do is remember any non-idle CPU we encountered while
scanning for an idle core. This way we'll only iterate every CPU once.

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lkml.kernel.org/r/20210127135203.19633-5-mgorman@techsingularity.net
kernel/sched/fair.c