xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Keir Fraser <keir@xen.org>,
	George Dunlap <george.dunlap@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1 of 6 v2] xen: sched_credit: improve picking up the idlal CPU for a VCPU
Date: Wed, 12 Dec 2012 11:19:13 +0100	[thread overview]
Message-ID: <1355307553.3992.32.camel@Abyss> (raw)
In-Reply-To: <50C864D402000078000AFDB0@nat28.tlf.novell.com>


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

On Wed, 2012-12-12 at 10:04 +0000, Jan Beulich wrote: 
> > -        weight_cpu = cpumask_weight(&cpu_idlers);
> > -        weight_nxt = cpumask_weight(&nxt_idlers);
> > +        nr_idlers_cpu = cpumask_weight(&cpu_idlers);
> > +        nr_idlers_nxt = cpumask_weight(&nxt_idlers);
> >          /* smt_power_savings: consolidate work rather than spreading it */
> >          if ( sched_smt_power_savings ?
> > -             weight_cpu > weight_nxt :
> > -             weight_cpu * migrate_factor < weight_nxt )
> > +             nr_idlers_cpu > nr_idlers_nxt :
> > +             nr_idlers_cpu * migrate_factor < nr_idlers_nxt )
> >          {
> >              cpumask_and(&nxt_idlers, &cpus, &nxt_idlers);
> >              spc = CSCHED_PCPU(nxt);
> 
> Despite you mentioning this in the description, these last two hunks
> are, afaict, only renaming variables (and that's even debatable, as
> the current names aren't really misleading imo), and hence I don't
> think belong in a patch that clearly has the potential for causing
> (performance) regressions.
> 
Ok, I think I can live with the current names too... Just a matter of
taste. :-)

> That said - I don't think it will (and even more, I'm agreeable to the
> change done).
> 
It has been benchmarked, together with the next change, and the results
are in the changelog of 2/6. Numbers there show that the combination of
those two changes are much more an improvement than anything else, at
least for the workloads I considered (which includes sysbench and
specjbb2005).

Anyway, I think I see your point, and I can either move the remane
somewhere else or kill it entirely.

> > --- a/xen/include/xen/sched.h
> > +++ b/xen/include/xen/sched.h
> > @@ -396,6 +396,9 @@ extern struct vcpu *idle_vcpu[NR_CPUS];
> >  #define is_idle_domain(d) ((d)->domain_id == DOMID_IDLE)
> >  #define is_idle_vcpu(v)   (is_idle_domain((v)->domain))
> >  
> > +#define current_on_cpu(_c) \
> > +  ( (per_cpu(schedule_data, _c).curr) )
> > +
> 
> This, imo, really belings into sched-if.h.
> 
Ok.

> Plus - what's the point of double parentheses, when in fact none
> at all would be needed?
> 
> And finally, why "_c" and not just "c"?
> 
Nothing particular, just "personal macro style", I guess, which I can
convert to what you ask and resend.

Thanks,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/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: 198 bytes --]

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

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

  reply	other threads:[~2012-12-12 10:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12  2:52 [PATCH 0 of 6 v2] xen: sched_credit: fix picking & tickling and also add some tracing Dario Faggioli
2012-12-12  2:52 ` [PATCH 1 of 6 v2] xen: sched_credit: improve picking up the idlal CPU for a VCPU Dario Faggioli
2012-12-12 10:04   ` Jan Beulich
2012-12-12 10:19     ` Dario Faggioli [this message]
2012-12-12 10:30       ` Jan Beulich
2012-12-12 10:38         ` Dario Faggioli
2012-12-14 19:50     ` George Dunlap
2012-12-17  8:35       ` Jan Beulich
2012-12-17 14:36         ` Dario Faggioli
2012-12-14 19:16   ` George Dunlap
2012-12-12  2:52 ` [PATCH 2 of 6 v2] xen: sched_credit: improve tickling of idle CPUs Dario Faggioli
2012-12-14 19:29   ` George Dunlap
2012-12-12  2:52 ` [PATCH 3 of 6 v2] xen: sched_credit: use current_on_cpu() when appropriate Dario Faggioli
2012-12-14 19:39   ` George Dunlap
2012-12-17 14:41     ` Dario Faggioli
2012-12-12  2:52 ` [PATCH 4 of 6 v2] xen: tracing: report where a VCPU wakes up Dario Faggioli
2012-12-14 19:57   ` George Dunlap
2012-12-17 14:43     ` Dario Faggioli
2012-12-12  2:52 ` [PATCH 5 of 6 v2] xen: tracing: introduce per-scheduler trace event IDs Dario Faggioli
2012-12-14 20:00   ` George Dunlap
2012-12-12  2:52 ` [PATCH 6 of 6 v2] xen: sched_credit: add some tracing Dario Faggioli
2012-12-14 20:05   ` George Dunlap
2012-12-17 14:45     ` 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=1355307553.3992.32.camel@Abyss \
    --to=dario.faggioli@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).