xen/sched: move some per-vcpu items to struct sched_unit
authorJuergen Gross <jgross@suse.com>
Fri, 27 Sep 2019 07:00:13 +0000 (09:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Sep 2019 13:20:13 +0000 (15:20 +0200)
commit8a04eaa8ea83341b17e502d0dfec564e8f77bfa3
treea27b10d004397c18691b2975462ed9fe95ee520d
parentcc3186d57ed84c53bdd46b6cffdc7deb7011ce73
xen/sched: move some per-vcpu items to struct sched_unit

Affinities are scheduler specific attributes, they should be per
scheduling unit. So move all affinity related fields in struct vcpu
to struct sched_unit. While at it switch affinity related functions in
sched-if.h to use a pointer to sched_unit instead to vcpu as parameter.

The affinity_broken flag must be kept per vcpu as it is related to
guest actions on specific vcpus. When support of multiple vcpus per
sched_unit is being added, a unit is regarded as being subject to
"broken affinity" when any of its vcpus has the affinity_broken flag
set.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/domain.c
xen/common/domctl.c
xen/common/keyhandler.c
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/common/sched_null.c
xen/common/sched_rt.c
xen/common/schedule.c
xen/include/xen/sched-if.h
xen/include/xen/sched.h