From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 2/3] xen: RCU: make the period of the idle timer configurable. Date: Tue, 26 Sep 2017 19:48:46 +0200 Message-ID: <1506448126.27663.34.camel@citrix.com> References: <150549814200.30442.14095065559616595274.stgit@Solace.fritz.box> <150549848446.30442.1115438035704916073.stgit@Solace.fritz.box> <59CA8AF9020000780017FDF9@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6696368890030958014==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwtyd-0002su-Jw for xen-devel@lists.xenproject.org; Tue, 26 Sep 2017 17:48:59 +0000 In-Reply-To: <59CA8AF9020000780017FDF9@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Jan Beulich Cc: Stefano Stabellini , Andrew Cooper , Tim Deegan , George Dunlap , Julien Grall , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org --===============6696368890030958014== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-zOa5jK5awCsyQwg5VWOU" --=-zOa5jK5awCsyQwg5VWOU Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2017-09-26 at 09:14 -0600, Jan Beulich wrote: > > > > On 15.09.17 at 20:01, wrote: > > --- a/xen/common/rcupdate.c > > +++ b/xen/common/rcupdate.c > > +=C2=A0=C2=A0=C2=A0=C2=A0int ret =3D 0; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0if ( MILLISECS(period) > IDLE_TIMER_PERIOD_MAX= ) > > +=C2=A0=C2=A0=C2=A0=C2=A0{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0printk("WARNING: rcu_i= dle_timer_period_ms must be < > > %"PRI_stime"\n", > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0IDLE_TIMER_PERIOD_MAX / MILLISECS(1)); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ret =3D -EINVAL; > > +=C2=A0=C2=A0=C2=A0=C2=A0} > > +=C2=A0=C2=A0=C2=A0=C2=A0else > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0idle_timer_period =3D = MILLISECS(period); > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0printk("RCU idle timer period: %lums\n", perio= d); > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0return ret; > > +} > > +custom_param("rcu_idle_timer_period_ms", parse_idle_timer_period); >=20 > Does this really need handling as custom_param(). I.e. wouldn't > integer_param() plus sanitizing in rcu_init() suffice?=20 > I did it like that in the first place. But then I did not like the overall look of the patch, so I changed the approach. I can put it back together the integer_param() variant, and you'll tell me which one you like better. > That would > also make the log message be printed uniformly - merely echoing > the value from the command line doesn't look very useful to me. > Mmm.. Sorry, but I don't get this part. > Additionally - what about a lower bound? Clearly zero would be > a rather bad choice? >=20 Indeed I should enforce a meaningful min too (I'll take it from patch 3 and put it here). > Also can you please switch to - as the separator in the command > line argument name? >=20 Ah, ok. Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-zOa5jK5awCsyQwg5VWOU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZypL/AAoJEBZCeImluHPu1NgQAMUuPwNrJT+OpHWE/Q3YyKPV wMNLZ2D2J0sSSgfgEirdqCBLpeW2smlV/AIoG3IfSZHxPn3DUaQcp3bCDpKUeOZC UBGwvCT51HSkqogQLsc6jMNPJaSPZYfg4m5OIpD1Ovc8ErqrpHKu0XkDUmFCaMg5 mfSHP8FTBLXb5X7peFFR/u1pbzkDhbikTdUj1/Dzz4KElu7m9B3A5hC318ZM/RqJ S15Q5eOWAvVxlNq7CoDwPnAEliiQIRQzGHPJIVlXhuTJ+i+EAp2oCDAAe9HntCIr rPkT4cg9qHE6H6y17cjoODfEkmNYlF393uwjqEZrIOKTvsgHJzT7QncQO2JLiwkj j5mjPSRkpySzpF1DK+ec/Y6ZnvZSoJ9vdZ3TGFTxbDwPfx3ilU6+PllE69O0apuM //u20twSzZ4wJA0xjnZ6r/Ou9o3oSz+slUo81s/XTjdQm4TIRyMvrnWcfoGfKIWV KgiPdCb8RmE7x1e+lI13x8HnV8+iF5nYhj1qDWDcAKMgz7YYSBCcWTu6m56wdlNs rXnRO2bkeECPIHDlWJgx8dAl3AAoRksbw7Yu09c+Ok7Ix7fUjVRyhzBuWqyvcQiS /rlJWVpNFdysxZn6Z1b75D0e+Lcj3vyMsyyk1VkWE9DKU1f3UJ9nAsd8VFacqfEY PhVsareL04XIIwOhW6Vo =PMO0 -----END PGP SIGNATURE----- --=-zOa5jK5awCsyQwg5VWOU-- --===============6696368890030958014== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6696368890030958014==--