]> xenbits.xensource.com Git - people/dwmw2/xen.git/commit
xen/sched: don't disable scheduler on cpus during suspend
authorJuergen Gross <jgross@suse.com>
Tue, 2 Apr 2019 05:34:57 +0000 (07:34 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 4 Apr 2019 10:10:12 +0000 (11:10 +0100)
commit0763cd2687897b55e7a87ff6e77f785136bcc2de
treef951ca9f0d78f568cc69c0c76d32227d7be3e4ad
parent6870ea9d1fad6fbe27cf3ce5fe093be709ad2668
xen/sched: don't disable scheduler on cpus during suspend

Today there is special handling in cpu_disable_scheduler() for suspend
by forcing all vcpus to the boot cpu. In fact there is no need for that
as during resume the vcpus are put on the correct cpus again.

So we can just omit the call of cpu_disable_scheduler() when offlining
a cpu due to suspend and on resuming we can omit taking the schedule
lock for selecting the new processor.

In restore_vcpu_affinity() we should be careful when applying affinity
as the cpu might not have come back to life. This in turn enables us
to even support affinity_broken across suspend/resume.

Avoid all other scheduler dealloc - alloc dance when doing suspend and
resume, too. It is enough to react on cpus failing to come up on resume
again.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/schedule.c