xen/sched: use sched_resource cpu instead smp_processor_id in schedulers
authorJuergen Gross <jgross@suse.com>
Fri, 27 Sep 2019 07:00:25 +0000 (09:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Sep 2019 14:00:35 +0000 (16:00 +0200)
commit224df9b002b9b708de7fe7523a33e1023d0a3e92
tree78c855415ce3aab16bcf188112196da7760bdfc4
parent8d3c326f6756d1701776d3f10b15e1db6407e85d
xen/sched: use sched_resource cpu instead smp_processor_id in schedulers

Especially in the do_schedule() functions of the different schedulers
using smp_processor_id() for the local cpu number is correct only if
the sched_unit is a single vcpu. As soon as larger sched_units are
used most uses should be replaced by the master_cpu number of the local
sched_resource instead.

Add a helper to get that sched_resource master_cpu and modify the
schedulers to use it in a correct way.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/sched_arinc653.c
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/common/sched_null.c
xen/common/sched_rt.c
xen/include/xen/sched-if.h