From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] sched_credit: Remove cpu argument to __runq_insert() Date: Fri, 30 Oct 2015 17:33:46 +0100 Message-ID: <1446222826.28782.156.camel@citrix.com> References: <1446217794-22320-1-git-send-email-write.harmandeep@gmail.com> <5633A7FE02000078000B04EB@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3316342152209921021==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZsCcj-00042G-Ms for xen-devel@lists.xenproject.org; Fri, 30 Oct 2015 16:33:53 +0000 In-Reply-To: <5633A7FE02000078000B04EB@prv-mh.provo.novell.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: Jan Beulich , Harmandeep Kaur Cc: xen-devel@lists.xenproject.org, keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org --===============3316342152209921021== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-tUnsqUR9fqM9T/Nm97Op" --=-tUnsqUR9fqM9T/Nm97Op Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2015-10-30 at 10:25 -0600, Jan Beulich wrote: > > > > On 30.10.15 at 16:09, wrote: > > --- a/xen/common/sched_credit.c > > +++ b/xen/common/sched_credit.c > > @@ -252,13 +252,12 @@ __runq_elem(struct list_head *elem) > > } > > =20 > > static inline void > > -__runq_insert(unsigned int cpu, struct csched_vcpu *svc) > > +__runq_insert(struct csched_vcpu *svc) > > { > > - const struct list_head * const runq =3D RUNQ(cpu); > > + const struct list_head * const runq =3D RUNQ(svc->vcpu > > ->processor); >=20 > ... this being an inline function the change will likely make the > compiler produce worse code, if only ... >=20 > > struct list_head *iter; > > =20 > > BUG_ON( __vcpu_on_runq(svc) ); > > - BUG_ON( cpu !=3D svc->vcpu->processor ); >=20 > ... this was an ASSERT() instead of a BUG_ON() (which it looks like > it should be). >=20 Mmm... I'm sorry, but I'm not getting what you are actually suggesting. Are you saying that we shouldn't make the change at all? Or that we should make the change and also turn the BUG_ON() (the one that is left in place) into an ASSERT()? Or that we should not mark the function as 'inline'? Harman, perhaps, can you check the assembly code produced by the compiler before and after your patch and report here what the differences are? 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) --=-tUnsqUR9fqM9T/Nm97Op 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 iEYEABECAAYFAlYzm+oACgkQk4XaBE3IOsSYDACeJ0VNPSkw11LBZWxMo2z9RY5g RAAAmweW7jYs6EwI3JoMNs+Zq2m1eOKF =iybU -----END PGP SIGNATURE----- --=-tUnsqUR9fqM9T/Nm97Op-- --===============3316342152209921021== 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 --===============3316342152209921021==--