[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v11 5/9] x86: dynamically attach/detach QoS monitoring service for a guest
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: Friday, June 20, 2014 11:08 PM > To: Xu, Dongxiao > Cc: andrew.cooper3@xxxxxxxxxx; Ian.Campbell@xxxxxxxxxx; > George.Dunlap@xxxxxxxxxxxxx; Ian.Jackson@xxxxxxxxxxxxx; > stefano.stabellini@xxxxxxxxxxxxx; xen-devel@xxxxxxxxxxxxx; > konrad.wilk@xxxxxxxxxx; dgdegra@xxxxxxxxxxxxx; keir@xxxxxxx > Subject: Re: [PATCH v11 5/9] x86: dynamically attach/detach QoS monitoring > service for a guest > > >>> On 20.06.14 at 16:31, <dongxiao.xu@xxxxxxxxx> wrote: > > +int pqos_monitor_alloc_rmid(struct domain *d) > > +{ > > + int rc = 0; > > + unsigned int rmid; > > + > > + ASSERT(pqos_monitor_enabled()); > > + > > + spin_lock(&pqosm->pqosm_lock); > > + > > + if ( d->arch.pqos_rmid > 0 ) > > + { > > + rc = -EEXIST; > > + goto out; > > + } > > Does this check really need to be inside the locked region? You're > already protected against races by the domctl lock. It seems no need any more for these qos monitor related lock. Will remove it. Thanks, Dongxiao > > > +void pqos_monitor_free_rmid(struct domain *d) > > +{ > > + unsigned int rmid; > > + > > + spin_lock(&pqosm->pqosm_lock); > > + rmid = d->arch.pqos_rmid; > > + /* We do not free system reserved "RMID=0" */ > > + if ( rmid == 0 ) > > + goto out; > > Similarly here. > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |