On Thu, 2016-03-24 at 15:42 +0000, George Dunlap wrote: > On Fri, Mar 18, 2016 at 7:06 PM, Dario Faggioli > wrote: > > > > From: Justin Weaver > >  > > Signed-off-by: Justin Weaver > > Signed-off-by: Dario Faggioli > Just checking, are the main changes between this patch and the v4 > that > Justin posted: > > 1) Moving the "scratch_mask" to a different patch > 2) The code-cleanups you listed? > Yes, indeed! Sorry for not pointing that out more clearly (e.g., in the cover letter). > One rather tangential question... > > --- a/xen/common/sched_credit2.c > > +++ b/xen/common/sched_credit2.c > > @@ -560,8 +590,9 @@ runq_tickle(const struct scheduler *ops, > > unsigned int cpu, struct csched2_vcpu * > >          goto tickle; > >      } > > > > -    /* Get a mask of idle, but not tickled */ > > +    /* Get a mask of idle, but not tickled, that new is allowed to > > run on. */ > >      cpumask_andnot(&mask, &rqd->idle, &rqd->tickled); > > +    cpumask_and(&mask, &mask, new->vcpu->cpu_hard_affinity); > It looks like this uses a cpumask_t on the stack -- can we use > scratch_mask here, or is there some reason we need to use the local > variable? > > But that's really something to either add to the previous patch, or > to > do in yet a different patch. > It's because that cpumask stack variable is there already, and the primary purpose of the scratch mask is to avoid _adding_more_ of them. This is how it has been introduced and used so far in Credit1 and RTDS. That said, I do agree it can well be used to get rid of some of the already existing stack variable, but, as you suggest yourself, I'm thinking about doing this in another patch. > Acked-by: George Dunlap > Thanks and Regards, Dario -- <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)