[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 4/5] xen: sched_null: support for hard affinity



On Fri, 2017-04-07 at 11:08 +0100, George Dunlap wrote:
> On 07/04/17 01:34, Dario Faggioli wrote:
> > @@ -413,7 +431,6 @@ static void null_vcpu_insert(const struct
> > scheduler *ops, struct vcpu *v)
> >  static void _vcpu_remove(struct null_private *prv, struct vcpu *v)
> >  {
> >      unsigned int cpu = v->processor;
> > -    struct domain *d = v->domain;
> >      struct null_vcpu *wvc;
> >  
> >      ASSERT(list_empty(&null_vcpu(v)->waitq_elem));
> > @@ -425,7 +442,7 @@ static void _vcpu_remove(struct null_private
> > *prv, struct vcpu *v)
> >       * If yes, we assign it to cpu, in spite of v.
> >       */
> >      wvc = list_first_entry_or_null(&prv->waitq, struct null_vcpu,
> > waitq_elem);
> > -    if ( wvc && cpumask_test_cpu(cpu, cpupool_domain_cpumask(d)) )
> > +    if ( wvc && vcpu_check_affinity(wvc->vcpu, cpu) )
> 
> Hmm, actually I just noticed that this only checks the first item on
> the
> list.  If there are two vcpus on the list, and the first one doesn't
> have affinity with the vcpu in question, the second one won't even be
> considered.  This was probably OK in the previous case, where the
> only
> time the test could fail is during suspend/resume, but it's not
> really
> OK anymore, I don't think.
> 
Good point. I need to scan the waitqueue. Will do.

> Everything else looks OK to me.
> 
Good to hear. :-)

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
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.