From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 12/15] xen: trace tasklets Date: Fri, 9 Jun 2017 13:17:53 +0200 Message-ID: <1497007073.26212.12.camel@citrix.com> References: <149633614204.12814.14390287626133023934.stgit@Solace.fritz.box> <149633850145.12814.17354434813897681091.stgit@Solace.fritz.box> <593A9B950200007800161474@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8799129962428325433==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJHvi-0003ic-Av for xen-devel@lists.xenproject.org; Fri, 09 Jun 2017 11:18:14 +0000 In-Reply-To: <593A9B950200007800161474@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 , George Dunlap , Andrew Cooper , Tim Deegan , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org --===============8799129962428325433== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-XmyPSZlMeokq7IEYAQ9p" --=-XmyPSZlMeokq7IEYAQ9p Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-06-09 at 04:59 -0600, Jan Beulich wrote: > > > > On 01.06.17 at 19:35, wrote: > > --- a/xen/common/tasklet.c > > +++ b/xen/common/tasklet.c > > @@ -30,10 +30,87 @@ static DEFINE_PER_CPU(struct list_head,=20 > > [...] > > +#else > >=20 > > +#define trace_enqueue(t)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0do {} while ( 0 = ) > > +#define trace_schedule(t)=C2=A0=C2=A0=C2=A0=C2=A0do {} while ( 0 ) > > +#define trace_work(t)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0d= o {} while ( 0 ) > > +#define trace_kill(t)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0d= o {} while ( 0 ) > > +#define trace_migrate()=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0do {} while= ( 0 ) > > +#define trace_init(t)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0d= o {} while ( 0 ) > > +#endif /* TRACE_TASKLETS */ >=20 > Seeing how such additions add up, I think I'd prefer if you put them > into header files instead of cluttering source files this way. You > could have one such header per traceable component. >=20 Right, good point. As a matter of fact, the components dealt with in this series, have their own header already, such as: xen/include/xen/rcupdate.h xen/include/xen/timer.h xen/include/xen/softirq.h xen/include/xen/tasklet.h I guess I can put these there? > > @@ -178,6 +258,11 @@ static void migrate_tasklets_from_cpu(unsigned > > int cpu, struct list_head *list) > > =C2=A0 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0spin_lock_irqsave(&tasklet_lock, flags); > > =C2=A0 > > +=C2=A0=C2=A0=C2=A0=C2=A0if ( list_empty(list) ) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto out; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0trace_migrate(); > > + > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0while ( !list_empty(list) ) >=20 > Two alternatives: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0if ( !list_empty(list) ) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0trace_migrate(); >=20 > (avoiding the goto) or >=20 > =C2=A0=C2=A0=C2=A0=C2=A0if ( list_empty(list) ) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto out; >=20 > =C2=A0=C2=A0=C2=A0=C2=A0trace_migrate(); >=20 > =C2=A0=C2=A0=C2=A0=C2=A0do { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0... > =C2=A0=C2=A0=C2=A0=C2=A0} while ( !list_empty(list) ); >=20 > (avoiding the redundant check). >=20 Sure. 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) --=-XmyPSZlMeokq7IEYAQ9p 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 iQIcBAABCAAGBQJZOoPjAAoJEBZCeImluHPu1goP/ia8yNDBBH1+AjB0TtwBY99n V2dr+lUvH/dPM73/59J+R2urfOc8qH6ndjp047sT6a1Y0gkUzE7AWaOcYUqYshXv b2vQxftmBGiM1/HCxKdLRHVn9SMeCZb2YQoPFzzg7VMhGEjkBZNCrhQD9cnjpfRw TRa1HAI30XLfIP+p0Yeh3/sacY7nnLOBkUGha6ghXCGnwcSdWD5LzeOVo/pVRS7T E6hmlZS0mZMWkvLfc5m08JLYGZ2HKx8T8K5sMdSMC/vDf1GnE6r2bgcS++rf/pIi SWNsxxrd1rVrVV2R85goIFrSQL3dWOTJUuXn/y0WUNOAyHhIRC2jsu3J7CwXYmZp VBw8R0ti2HlXr0grg0YC2tRdYI5ptOiQls8jXJvX9Q/hAhjkdaYMziR588uaKW/t yRA3A9Czjo2aYAD6BMDtna2435O0EYDBSG4RE+wUGJDo7ZkqwjpAJC/u0JytMLy3 ifkYa/YOoJrimCcQdoPddo9NznKh/Q3CtWjxv+FU885bY5GDUjNHQteCqVtalWVG 2LZHCoJ8wdYbvJG/N9/4xAwnsLxlJg7t52dEBua7VZD1fx8ri9eyERzSfzbm4WlT 6CCSeLdNYsBuc+v15EHRs2vTIBgi8caWCBn7FOADDzdkQUgWGmoMfLnDFHN+4Uh+ 5MpoyLxe/7Oz5efboSOk =Zt4g -----END PGP SIGNATURE----- --=-XmyPSZlMeokq7IEYAQ9p-- --===============8799129962428325433== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============8799129962428325433==--