All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: George Dunlap <george.dunlap@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	xen-devel@lists.xenproject.org, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] xen: credit2: clear bit instead of skip step in runq_tickle()
Date: Thu, 26 Jan 2017 02:00:15 +0100	[thread overview]
Message-ID: <1485392415.32103.138.camel@citrix.com> (raw)
In-Reply-To: <587F51C402000078001312AE@prv-mh.provo.novell.com>


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

On Wed, 2017-01-18 at 03:30 -0700, Jan Beulich wrote:
> > > > On 18.01.17 at 11:21, <george.dunlap@citrix.com> wrote:
> > On 18/01/17 00:30, Dario Faggioli wrote:
> > > index ef8e0d8..d086264 100644
> > > --- a/xen/common/sched_credit2.c
> > > +++ b/xen/common/sched_credit2.c
> > > @@ -985,7 +985,7 @@ runq_tickle(const struct scheduler *ops,
> > > struct csched2_vcpu *new, s_time_t now)
> > >      cpumask_andnot(&mask, &rqd->active, &rqd->idle);
> > >      cpumask_andnot(&mask, &mask, &rqd->tickled);
> > >      cpumask_and(&mask, &mask, new->vcpu->cpu_hard_affinity);
> > > -    if ( cpumask_test_cpu(cpu, &mask) )
> > > +    if ( __cpumask_test_and_clear_cpu(cpu, &mask) )
> > 
> > Since we're micro-optimizing -- isn't test-and-clear a locked
> > operation?
> >  Would that be more expensive than the if() statement below?
> 
> cpumask_test_and_clear_cpu() is, but __cpumask_test_and_clear_cpu()
> isn't.
> 
George, ping?

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

  parent reply	other threads:[~2017-01-26  1:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18  0:30 [PATCH] xen: credit2: clear bit instead of skip step in runq_tickle() Dario Faggioli
2017-01-18 10:21 ` George Dunlap
2017-01-18 10:30   ` Jan Beulich
2017-01-18 11:05     ` Dario Faggioli
2017-01-26  1:00     ` Dario Faggioli [this message]
2017-02-01 15:00       ` George Dunlap

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=1485392415.32103.138.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=george.dunlap@eu.citrix.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.