From: Dario Faggioli Date: Thu, 15 Sep 2016 11:35:03 +0000 (+0100) Subject: xen: credit1: fix mask to be used for tickling in Credit1 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~398 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f83fc393b2bb0a8b97bca07d810684a2c709aaa8;p=xen.git xen: credit1: fix mask to be used for tickling in Credit1 If there are idle pcpus inside the waking vcpu's soft-affinity mask, we should really tickle one of them (this is one of the purposes of the __runq_tickle() function itself!), not just any idle pcpu. The issue has been introduced in 02ea5031825d ("credit1: properly deal with pCPUs not in any cpupool"), where the usage of idle_mask is changed, without updating the bottom of the function, where it is also referenced. Signed-off-by: Dario Faggioli Acked-by: George Dunlap --- diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index 472fb2893a..16325b5f07 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -463,11 +463,12 @@ static inline void __runq_tickle(struct csched_vcpu *new) if ( opt_tickle_one_idle ) { this_cpu(last_tickle_cpu) = - cpumask_cycle(this_cpu(last_tickle_cpu), &idle_mask); + cpumask_cycle(this_cpu(last_tickle_cpu), + cpumask_scratch_cpu(cpu)); __cpumask_set_cpu(this_cpu(last_tickle_cpu), &mask); } else - cpumask_or(&mask, &mask, &idle_mask); + cpumask_or(&mask, &mask, cpumask_scratch_cpu(cpu)); } /* Did we find anyone? */