xen/sched: protect scheduling resource via rcu
authorJuergen Gross <jgross@suse.com>
Wed, 2 Oct 2019 07:27:39 +0000 (09:27 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Oct 2019 11:01:26 +0000 (13:01 +0200)
commit2fc63543695827eb36d649fd526d2ac3aa3d3f0b
tree45b8153e43dc411c55a5941f51246da725633b03
parent2ea514e1b8c9aafb878e926d6199e93c13fedfb9
xen/sched: protect scheduling resource via rcu

In order to be able to move cpus to cpupools with core scheduling
active it is mandatory to merge multiple cpus into one scheduling
resource or to split a scheduling resource with multiple cpus in it
into multiple scheduling resources. This in turn requires to modify
the cpu <-> scheduling resource relation. In order to be able to free
unused resources protect struct sched_resource via RCU. This ensures
there are no users left when freeing such a resource.

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