diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index 0cb33831d2..babac7aad6 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -3176,6 +3176,8 @@ int schedule_cpu_add(unsigned int cpu, struct cpupool *c) sr->scheduler = new_ops; sr->sched_priv = ppriv; + sr->granularity = cpupool_get_granularity(c); + sr->cpupool = c; /* * Reroute the lock to the per pCPU lock as /last/ thing. In fact, @@ -3188,8 +3190,6 @@ int schedule_cpu_add(unsigned int cpu, struct cpupool *c) /* _Not_ pcpu_schedule_unlock(): schedule_lock has changed! */ spin_unlock_irqrestore(old_lock, flags); - sr->granularity = cpupool_get_granularity(c); - sr->cpupool = c; /* The cpu is added to a pool, trigger it to go pick up some work */ cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ);