]> xenbits.xensource.com Git - xen.git/commit
xen/sched: fix restore_vcpu_affinity() by removing it
authorJuergen Gross <jgross@suse.com>
Mon, 31 Oct 2022 12:34:28 +0000 (13:34 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 31 Oct 2022 12:34:28 +0000 (13:34 +0100)
commit9c5114696c6f7773b7f3691f27aaa7a0636c916d
tree9ca430f83064326d13a5033f29dc07f93dfa9965
parent1f679f084fef76810762ee69a584fc1b524be0b6
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