xen/sched: fix restore_vcpu_affinity() by removing it
authorJuergen Gross <jgross@suse.com>
Mon, 31 Oct 2022 12:23:50 +0000 (13:23 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 31 Oct 2022 12:23:50 +0000 (13:23 +0100)
commit88f2bf5de9ad789e1c61b5d5ecf118909eed6917
tree23a0b6cf659204bffc9937a3f2782c0b3517f2ef
parent481465f35da1bcec0b2a4dfd6fc51d86cac28547
xen/sched: fix restore_vcpu_affinity() by removing it

When the system is coming up after having been suspended,
restore_vcpu_affinity() is called for each domain in order to adjust
the vcpu's affinity settings in case a cpu didn't come to live again.

The way restore_vcpu_affinity() is doing that is wrong, because the
specific scheduler isn't being informed about a possible migration of
the vcpu to another cpu. Additionally the migration is often even
happening if all cpus are running again, as it is done without check
whether it is really needed.

As cpupool management is already calling cpu_disable_scheduler() for
cpus not having come up again, and cpu_disable_scheduler() is taking
care of eventually needed vcpu migration in the proper way, there is
simply no need for restore_vcpu_affinity().

So just remove restore_vcpu_affinity() completely, together with the
no longer used sched_reset_affinity_broken().

Fixes: 8a04eaa8ea83 ("xen/sched: move some per-vcpu items to struct sched_unit")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
master commit: fce1f381f7388daaa3e96dbb0d67d7a3e4bb2d2d
master date: 2022-10-24 11:16:27 +0100
xen/arch/x86/acpi/power.c
xen/common/sched/core.c
xen/include/xen/sched.h