xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <xumengpanda@gmail.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v4] xen: sched_rt: print useful affinity info when dumping
Date: Tue, 12 May 2015 18:39:17 +0200	[thread overview]
Message-ID: <1431448757.2978.71.camel@citrix.com> (raw)
In-Reply-To: <CAENZ-+na2=QHxiuNwXqmQ_CCSh3SOHX_zfgBODi0232ZHq5DuA@mail.gmail.com>


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

On Tue, 2015-05-12 at 12:01 -0400, Meng Xu wrote:
> Hi Dario,
> 
Hi,

> 2015-05-12 10:06 GMT-04:00 Dario Faggioli <dario.faggioli@citrix.com>:

> > --- a/xen/common/sched_rt.c
> > +++ b/xen/common/sched_rt.c
> > @@ -124,6 +124,24 @@
> >  #define TRC_RTDS_BUDGET_REPLENISH TRC_SCHED_CLASS_EVT(RTDS, 4)
> >  #define TRC_RTDS_SCHED_TASKLET    TRC_SCHED_CLASS_EVT(RTDS, 5)
> >
> > + /*
> > +  * Useful to avoid too many cpumask_var_t on the stack.
> > +  */
> > +static cpumask_t **_cpumask_scratch;
> > +#define cpumask_scratch _cpumask_scratch[smp_processor_id()]
> 
> The cpumask_scratch seems never used in this patch.. Did I miss anything?
>
No, it's never used, because, as it happens, the use case this patch
deals with needs to explicitly reference the _cpumask_scratch array.
That should be the exception rather than the rule, and the reason why it
is necessary this time is given in the comments.

> If it's not used in any other places, do we really need this #define?
> 
We do, IMO. The changelog says that, in addition to improving the dump
output, this change puts in place a "scratch cpumask machinery", useful
to reduce the use of either on stack or dynamically allocated cpumask-s.
That #define is part of the machinery, as it is what people should use
everywhere (possible), to reference the scratch bitmap.

So, let me ask a question myself: when can we expect a patch that takes
advantage of the scratch cpumask machinery being introduced here, in
order to get rid of some (most, hopefully) of the cpumask_t and
cpumask_var_t all around sched_rt.c? :-D

When that will happen, you'll need that #define, and if I kill it from
here, you'll have to introduce it yourself. As said, I like it being
introduced here better, but can live with you adding it with your
patch(es), if that's what everyone else prefer.

Regards,
Dario

[-- 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

  reply	other threads:[~2015-05-12 16:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 14:06 [PATCH v4] xen: sched_rt: print useful affinity info when dumping Dario Faggioli
2015-05-12 16:01 ` Meng Xu
2015-05-12 16:39   ` Dario Faggioli [this message]
2015-05-12 19:05     ` Meng Xu
2015-06-01 13:20 ` 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=1431448757.2978.71.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    --cc=xumengpanda@gmail.com \
    /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).