xen/sched: prepare per-cpupool scheduling granularity
authorJuergen Gross <jgross@suse.com>
Wed, 2 Oct 2019 07:27:37 +0000 (09:27 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Oct 2019 11:00:22 +0000 (13:00 +0200)
commitdad79946e552179cdfec32bf98f62a1f8bc4798e
tree3d33a65738ad79b2cf631a992f3da153ba3f34f0
parentc4598b3d945bf64be181efc2e63132a432d73172
xen/sched: prepare per-cpupool scheduling granularity

On- and offlining cpus with core scheduling is rather complicated as
the cpus are taken on- or offline one by one, but scheduling wants them
rather to be handled per core.

As the future plan is to be able to select scheduling granularity per
cpupool prepare that by storing the granularity in struct
sched_resource (we need it there for free cpus which are not
associated to any cpupool). Free cpus will always use granularity 1.

Store the selected granularity option (cpu, core or socket) in the
cpupool , as we will need it to select the appropriate cpu mask when
populating the cpupool with cpus.

This will make on- and offlining of cpus much easier and avoids
writing code which would needed to be thrown away later.

Move the granularity related variables to cpupool.c as they are now
used form there only.

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