xen: merge temporary vcpu pinning scenarios
authorJuergen Gross <jgross@suse.com>
Fri, 26 Jul 2019 08:45:49 +0000 (10:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Jul 2019 08:45:49 +0000 (10:45 +0200)
commit1f3c111f230ae41ac9908114f439933e2c6e1e29
tree4e3882de3a5189aed4e9ac471a8a0875e13ff409
parentffa5c3b6557938f1b321081e87f656bc066475fa
xen: merge temporary vcpu pinning scenarios

Today there are two scenarios which are pinning vcpus temporarily to
a single physical cpu:

- wait_event() handling
- SCHEDOP_pin_override handling

Each of those cases are handled independently today using their own
temporary cpumask to save the old affinity settings.

The two cases can be combined as the first case will only pin a vcpu to
the physical cpu it is already running on, while SCHEDOP_pin_override is
allowed to fail.

So merge the two temporary pinning scenarios by only using one cpumask
and a per-vcpu bitmask for specifying which of the scenarios is
currently active (they are both allowed to be active for the same vcpu).

Note that we don't need to call domain_update_node_affinity() as we
are only pinning for a brief period of time.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/domain.c
xen/common/domctl.c
xen/common/schedule.c
xen/common/wait.c
xen/include/xen/sched.h