]> Git Repo - linux.git/commit
sched/fair: Merge select_idle_core/cpu()
authorMel Gorman <[email protected]>
Wed, 27 Jan 2021 13:52:03 +0000 (13:52 +0000)
committerIngo Molnar <[email protected]>
Wed, 17 Feb 2021 13:07:25 +0000 (14:07 +0100)
commit9fe1f127b913318c631d0041ecf71486e38c2c2d
tree099925bb3e479747b50765ca341b0862806fd5c6
parent6cd56ef1df399a004f90ecb682427f9964969fc9
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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Vincent Guittot <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
kernel/sched/fair.c
This page took 0.053521 seconds and 4 git commands to generate.