[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/2] xen: credit1: avoid boosting vCPUs being "just" migrated
On Fri, 2016-02-12 at 02:50 -0700, Jan Beulich wrote: > > > > On 12.02.16 at 10:37, <dario.faggioli@xxxxxxxxxx> wrote: > > @@ -787,6 +788,16 @@ _csched_cpu_pick(const struct scheduler *ops, > > struct vcpu *vc, bool_t commit) > > Âstatic int > > Âcsched_cpu_pick(const struct scheduler *ops, struct vcpu *vc) > > Â{ > > +ÂÂÂÂstruct csched_vcpu *svc = CSCHED_VCPU(vc); > > + > > +ÂÂÂÂ/* > > +ÂÂÂÂÂ* We have been called by vcpu_migrate() (in schedule.c), as > > part > > +ÂÂÂÂÂ* of the process of seeing if vc can be migrated to another > > pcpu. > > +ÂÂÂÂÂ* We make a note about this in svc->flags so that later, in > > +ÂÂÂÂÂ* csched_vcpu_wake() (still called from vcpu_migrate()) we > > won't > > +ÂÂÂÂÂ* get boosted, which we don't deserve as we are "only" > > migrating. > > +ÂÂÂÂÂ*/ > > +ÂÂÂÂset_bit(CSCHED_FLAG_VCPU_MIGRATING, &svc->flags); > > ÂÂÂÂÂreturn _csched_cpu_pick(ops, vc, 1); > > Â} > > I think you either want __set_bit() here or ... > Yes, this is completely serialized by the vcpu's scheduler lock, so I indeed want __set_bit(), sorry for the overlook. Thanks and Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |