All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: George Dunlap <george.dunlap@citrix.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <stefano@aporeto.com>,
	Jonathan Davies <Jonathan.Davies@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	Marcus Granado <marcus.granado@citrix.com>
Subject: Re: [PATCH v2 4/5] xen: sched_null: support for hard affinity
Date: Fri, 7 Apr 2017 12:11:11 +0200	[thread overview]
Message-ID: <1491559871.3287.6.camel@citrix.com> (raw)
In-Reply-To: <2686af52-6e38-61ab-c727-0e9b99740a98@citrix.com>


[-- Attachment #1.1: Type: text/plain, Size: 1724 bytes --]

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 #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

  reply	other threads:[~2017-04-07 10:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07  0:33 [PATCH v2 0/5] The 'null' Scheduler Dario Faggioli
2017-04-07  0:33 ` [PATCH v2 1/5] xen: sched: improve robustness (and rename) DOM2OP() Dario Faggioli
2017-04-07  8:44   ` George Dunlap
2017-04-07  9:05     ` Dario Faggioli
2017-04-07  0:34 ` [PATCH v2 2/5] xen: sched: make sure a pCPU added to a pool runs the scheduler ASAP Dario Faggioli
2017-04-07  8:47   ` George Dunlap
2017-04-07  0:34 ` [PATCH v2 3/5] xen: sched: introduce the 'null' semi-static scheduler Dario Faggioli
2017-04-07  7:24   ` Alan Robinson
2017-04-07  9:17   ` George Dunlap
2017-04-07  0:34 ` [PATCH v2 4/5] xen: sched_null: support for hard affinity Dario Faggioli
2017-04-07 10:08   ` George Dunlap
2017-04-07 10:11     ` Dario Faggioli [this message]
2017-04-07  0:34 ` [PATCH v2 5/5] tools: sched: add support for 'null' scheduler Dario Faggioli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491559871.3287.6.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=Jonathan.Davies@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=marcus.granado@citrix.com \
    --cc=stefano@aporeto.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.