From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 3 of 3] xen: sched_credit: add some tracing Date: Wed, 05 Dec 2012 12:54:32 +0100 Message-ID: <1354708472.21632.21.camel@Abyss> References: <50BE4AC2.9010507@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8566342031109079452==" Return-path: In-Reply-To: <50BE4AC2.9010507@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: xen-devel , "Keir (Xen.org)" List-Id: xen-devel@lists.xenproject.org --===============8566342031109079452== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-WUZgaHDN8BN8NoE8N1ki" --=-WUZgaHDN8BN8NoE8N1ki Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2012-12-04 at 19:10 +0000, George Dunlap wrote:=20 > On 03/12/12 16:35, Dario Faggioli wrote: > > + /* Avoid TRACE_* to avoid a lot of useless !tb_init_done c= hecks */ > > + for_each_cpu(cpu, &mask) > > + { > > + struct { > > + unsigned cpu:8; > > + } d; > > + d.cpu =3D cpu; > > + trace_var(TRC_CSCHED_TICKLE, 0, > > + sizeof(d), > > + (unsigned char*)&d); >=20 > Why not just TRC_1D()?=20 > As I tried to explain in the comment, I just wanted to avoid checking for !tb_init_done more than once, as this happens within a loop and, at least potentially, there may be more CPUs to tickle (and thus more calls to TRACE_1D). I take this comment of yours as you not thinking that is something worthwhile, right? If so, I can definitely turn this into a "standard" TRACE_1D() call. > The tracing infrastructure can only set the size=20 > at a granularity of 32-bit words anyway, and at this point cpu is=20 > "unsigned int", which will be a single word. >=20 I know that. I just followed suit from sched_credit2.c, but I agree it's quite pointless for just one single field. Even if we decide to leave the direct call to trace_var, I'll kill the dummy struct. > Other than that, everything looks good. >=20 Ok, thanks. :-) Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-WUZgaHDN8BN8NoE8N1ki 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 v1.4.12 (GNU/Linux) iEYEABECAAYFAlC/NfgACgkQk4XaBE3IOsSMRACfcIRIZQMBcotE1UUDvHOi7MCM fMcAoIK6Wz9Ju+Dq+j39UOda/nNa5FER =EPkL -----END PGP SIGNATURE----- --=-WUZgaHDN8BN8NoE8N1ki-- --===============8566342031109079452== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============8566342031109079452==--