>>> On 24.09.15 at 06:31, <dario.faggi...@citrix.com> wrote: > --- a/xen/common/sched_credit.c > +++ b/xen/common/sched_credit.c > @@ -168,14 +168,16 @@ struct csched_pcpu { > }; > > /* > - * Convenience macro for accessing the per-PCPU cpumask we need for > + * Convenience macros for accessing the per-PCPU cpumask we need for > * implementing the two steps (soft and hard affinity) balancing logic. > * It is stored in csched_pcpu so that serialization is not an issue, > - * as there is a csched_pcpu for each PCPU and we always hold the > - * runqueue spin-lock when using this. > + * as there is a csched_pcpu for each PCPU, and we always hold the > + * runqueue lock for the proper PCPU when using these. > */ > #define csched_balance_mask (CSCHED_PCPU(smp_processor_id())->balance_mask) > > +#define csched_balance_mask_cpu(c) (CSCHED_PCPU(c)->balance_mask)
csched_runq_steal() gets called with peer_cpu's runqueue lock held afaics, but uses smp_processor_id()'s balance_mask. I.e. it looks to me that what Jürgen suggested as an option is actually a requirement. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel