]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Fix clearing of has_idle_cores flag in select_idle_cpu()
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Tue, 11 May 2021 15:16:09 +0000 (20:46 +0530)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 May 2021 08:41:28 +0000 (10:41 +0200)
commit6566f6a092c4f191fa75b24b92df1db716a57b48
treef1bce7b5b98c85de0074f3c0fc7e6972eba30369
parent202d21f8b06a52cf66ca97b838e5479393622d05
sched/fair: Fix clearing of has_idle_cores flag in select_idle_cpu()

In commit:

  7b1511b8eefa ("sched/fair: Merge select_idle_core/cpu()")

in select_idle_cpu(), we check if an idle core is present in the LLC
of the target CPU via the flag "has_idle_cores". We look for the idle
core in select_idle_cores(). If select_idle_cores() isn't able to find
an idle core/CPU, we need to unset the has_idle_cores flag in the LLC
of the target to prevent other CPUs from going down this route.

However, the current code is unsetting it in the LLC of the current
CPU instead of the target CPU. This patch fixes this issue.

Fixes: 7b1511b8eefa ("sched/fair: Merge select_idle_core/cpu()")
Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Link: https://lore.kernel.org/r/1620746169-13996-1-git-send-email-ego@linux.vnet.ibm.com
kernel/sched/fair.c