Cpupools: vcpu affinity handling
PATCH 1/1 Cpupools: vcpu affinity handling
If a vcpu is pinned to multiple physical cpus, the pinning is not removed if all those physical cpus are removed from the cpupool. When disabling the scheduler on a cpu, the affinity mask must be checked against the cpumask of the cpupool.
1 file changed, 3 insertions(+), 1 deletion(-)
xen/common/schedule.c | 4 +++-
# HG changeset patch
# User Juergen Gross <[email protected]> # Date 1297263136 -3600
# Node ID 05fdb700884f15e5c4e2a44b388fe2af7ee3056b # Parent 1967c7c290ebc6caf29cd3124facc47370c102a3
Cpupools: vcpu affinity handling
If a vcpu is pinned to multiple physical cpus, the pinning is not removed if all those physical cpus are removed from the cpupool. When disabling the scheduler on a cpu, the affinity mask must be checked against the cpumask of the cpupool.
xen/common/schedule.c +3 -1
@@ -466,6 +466,7 @@ int cpu_disable_scheduler(unsigned int cstruct domain *d;struct vcpu *v;struct cpupool *c; +cpumask_t online_affinity;int ret =0 ;bool_t affinity_broken;
@@ -484,7 +485,8 @@ int cpu_disable_scheduler(unsigned int c {vcpu_schedule_lock_irq (v); -if ( (cpus_weight (v->cpu_affinity) ==1 ) && +cpus_and (online_affinity, v->cpu_affinity, c->cpu_valid); +if (cpus_empty (online_affinity) &&cpu_isset (cpu, v->cpu_affinity) ) { printk("Breaking vcpu affinity for domain %d vcpu %d\n",
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel