From: Dario Faggioli <dario.faggioli@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Marcus.Granado@eu.citrix.com, Justin Weaver <jtweaver@hawaii.edu>,
george.dunlap@eu.citrix.com, esb@ics.hawaii.edu,
xen-devel@lists.xen.org, henric@hawaii.edu
Subject: Re: [PATCH] Xen sched: Fix multiple runqueues in credit2
Date: Thu, 6 Feb 2014 15:20:08 +0100 [thread overview]
Message-ID: <1391696408.9917.28.camel@Solace> (raw)
In-Reply-To: <52F37D3C0200007800119BDF@nat28.tlf.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 2390 bytes --]
On gio, 2014-02-06 at 11:17 +0000, Jan Beulich wrote:
> >>> On 06.02.14 at 09:58, Justin Weaver <jtweaver@hawaii.edu> wrote:
> > --- a/xen/common/sched_credit2.c
> > +++ b/xen/common/sched_credit2.c
> > @@ -85,8 +85,7 @@
> > * to a small value, and a fixed credit is added to everyone.
> > *
> > * The plan is for all cores that share an L2 will share the same
> > - * runqueue. At the moment, there is one global runqueue for all
> > - * cores.
> > + * runqueue.
>
> If this is the intention, then ...
>
> [...]
>
> ... this is too simplistic: Whether the L2 is shared by all cores on a
> socket should be determined, not assumed.
>
True. However, what we do right now is trying to build one runqueu per
socket, by means of cpu_to_socket(), and failing badly, ending up with
only one *system wide* runqueue. Personally, I think that fixing this,
i.e., keeping using cpu_to_socket(), but in a correct way, and actually
building '1 runqueue per socket' would be a reasonable step in the
original author's intentions. Of course, in this case, I concur that the
comment above needs changing too.
Thoughts?
> Apart from that keeping the CPU0 special case at the top is pointless
> with the cpu0_socket special casing.
>
Indeed. If going this route, Justin, I think you can reorganize the
whole `if (cpu == 0)' (not only the else), and get to a more correct and
readable solution.
> As to coding style: Please fix your comments and get the indentation
> of the if/else sequence above right (i.e. either use "else if" with no
> added indentation, or enclose the inner if/else in figure braces (I'd
> personally prefer the former).
>
Yep, agreed. To be fair, about comments, sched_credit2.c has quite a
mixture of commenting style in it, and it's really an hard call to
decide which one should be used. Anyway, Justin, if you reorganize the
whole `if () else' block, you are probably better off with a big comment
describing the whole thing, before the block itself, for which you can
use the following style:
/*
* Long comment...
*/
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: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-02-06 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 8:58 [PATCH] Xen sched: Fix multiple runqueues in credit2 Justin Weaver
2014-02-06 9:13 ` Juergen Gross
2014-02-06 13:44 ` Dario Faggioli
2014-02-06 13:54 ` Juergen Gross
2014-02-06 13:57 ` Dario Faggioli
2014-02-06 11:17 ` Jan Beulich
2014-02-06 14:20 ` Dario Faggioli [this message]
2014-02-08 7:37 ` Justin Weaver
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=1391696408.9917.28.camel@Solace \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=Marcus.Granado@eu.citrix.com \
--cc=esb@ics.hawaii.edu \
--cc=george.dunlap@eu.citrix.com \
--cc=henric@hawaii.edu \
--cc=jtweaver@hawaii.edu \
--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 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.