]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit - kernel/sched/fair.c
sched/fair: Use recent_used_cpu to test p->cpus_ptr
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 20 Jun 2023 08:07:47 +0000 (16:07 +0800)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:20:36 +0000 (17:20 +0200)
commitf0d1ae057a6ab792078cd9d82487cb53ce916eea
treefcfff08f5c1180069baae0295d20db85bfba6e81
parent63d741d60d5e9c7e8b5d6873bbd4d34f516522d9
sched/fair: Use recent_used_cpu to test p->cpus_ptr

BugLink: https://bugs.launchpad.net/bugs/2037005
[ Upstream commit ae2ad293d6be143ad223f5f947cca07bcbe42595 ]

When checking whether a recently used CPU can be a potential idle
candidate, recent_used_cpu should be used to test p->cpus_ptr as
p->recent_used_cpu is not equal to recent_used_cpu and candidate
decision is made based on recent_used_cpu here.

Fixes: 89aafd67f28c ("sched/fair: Use prev instead of new target as recent_used_cpu")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Phil Auld <pauld@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Link: https://lore.kernel.org/r/20230620080747.359122-1-linmiaohe@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
kernel/sched/fair.c