]> xenbits.xensource.com Git - people/larsk/xen.git/commit
sched: remove cpu from pool0 before removing it
authorJuergen Gross <jgross@suse.com>
Tue, 24 Sep 2019 15:10:06 +0000 (17:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Sep 2019 15:10:06 +0000 (17:10 +0200)
commit73d1d61fa9de31575d7631a3390d70ba154d151b
treefcab005d06306ea950b4af40120472889d8f5e64
parentdf29d03f1d97bdde1bc0cea8ef8538d4f524b3ec
sched: remove cpu from pool0 before removing it

Today a cpu which is removed from the system is taken directly from
Pool0 to the offline state. This will conflict with the new idle
scheduler, so remove it from Pool0 first. Additionally accept removing
a free cpu instead of requiring it to be in Pool0.

For the resume failed case we need to call the scheduler code for that
situation after the cpupool handling, so move the scheduler code into
a function and call it from cpupool_cpu_remove_forced() and remove the
CPU_RESUME_FAILED case from cpu_schedule_callback().

Note that we are calling now schedule_cpu_switch() in stop_machine
context so we need to switch from spinlock_irq to spinlock_irqsave.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Tested-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/cpupool.c
xen/common/schedule.c
xen/include/xen/sched-if.h