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: Stefano Stabellini <sstabellini@kernel.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 2/3] xen: RCU: make the period of the idle timer configurable.
Date: Thu, 28 Sep 2017 16:58:06 +0200	[thread overview]
Message-ID: <1506610686.5001.11.camel@citrix.com> (raw)
In-Reply-To: <59CD100D0200007800180825@prv-mh.provo.novell.com>


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

On Thu, 2017-09-28 at 07:06 -0600, Jan Beulich wrote:
> > > > On 28.09.17 at 12:16, <dario.faggioli@citrix.com> wrote:
> > 
> > @@ -569,6 +579,16 @@ void __init rcu_init(void)
> >  {
> >      void *cpu = (void *)(long)smp_processor_id();
> >  
> > +    /* We don't allow 0, or anything higher than
> > IDLE_TIMER_PERIOD_MAX */
> > +    if ( idle_timer_period_ms < 1 ||
> 
> The literal 1 here looks suspicious. How about simply refusing 0
> (as well as too high values)? The also simply document the value
> must be non-zero in the command line doc.
> 
Ok, sure.

> > +         idle_timer_period_ms > IDLE_TIMER_PERIOD_MAX /
> > MILLISECS(1) )
> > +    {
> > +        printk("WARNING: rcu-idle-timer-period-ms outside of
> > [%d,%ld]ms!\n",
> > +               1, IDLE_TIMER_PERIOD_MAX / MILLISECS(1));
> 
> Clearly the %d can be literal 1 if the above literal 1 was to stay.
>
Yes it can. It's actually rather ugly to look at it, the way I managed
to write it... Ewww... sorry! :-P

> If you follow my suggestion, use "(0," instead. 
>
Yeah, I like this too. I was afraid it was a bit too formal, that not
everyone would understand it, but I guess it's actually fine.

> As to the %ld -
> wouldn't that rather need to be PRI_stime (due to MILLISECS()
> returning s_time_t)?
> 
Yes.

> And then, as a cosmetic thing, idle_timer_period_ms now isn't
> really needed outside of this function. I'd prefer if you moved it
> and the integer_param() into this function, to limit their scopes
> as much as possible.
> 
Ok. idle_timer_period_ms still wants to go into __initdata, right?

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-09-28 14:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 10:15 [PATCH v2 0/3] xen: RCU: Improve the idle timer handling Dario Faggioli
2017-09-28 10:15 ` [PATCH v2 1/3] xen: RCU: let the RCU idle timer handler run Dario Faggioli
2017-09-28 12:59   ` Jan Beulich
2017-09-28 14:08     ` Dario Faggioli
2017-09-28 15:35       ` Jan Beulich
2017-09-28 10:16 ` [PATCH v2 2/3] xen: RCU: make the period of the idle timer configurable Dario Faggioli
2017-09-28 13:06   ` Jan Beulich
2017-09-28 14:58     ` Dario Faggioli [this message]
2017-09-28 15:35       ` Jan Beulich
2017-09-28 17:16     ` Dario Faggioli
2017-10-04  5:45       ` Jan Beulich
2017-09-28 10:16 ` [PATCH v2 3/3] xen: RCU: make the period of the idle timer adaptive Dario Faggioli
2017-09-28 13:08   ` Jan Beulich

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=1506610686.5001.11.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --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 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).