From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] xen: enable per-VCPU parameter for RTDS Date: Tue, 5 Apr 2016 11:39:02 +0200 Message-ID: <1459849142.3166.24.camel@citrix.com> References: <1459809913-1958-1-git-send-email-lichong659@gmail.com> <5702F541.9000809@citrix.com> <570382D7.8010507@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6842053357740593795==" Return-path: In-Reply-To: <570382D7.8010507@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , Andrew Cooper , Chong Li , xen-devel@lists.xen.org Cc: Chong Li , Sisu Xi , george.dunlap@eu.citrix.com, Meng Xu , jbeulich@suse.com, dgolomb@seas.upenn.edu List-Id: xen-devel@lists.xenproject.org --===============6842053357740593795== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-4cX4jUCySDWivw9eJdK8" --=-4cX4jUCySDWivw9eJdK8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-04-05 at 10:18 +0100, George Dunlap wrote: > On 05/04/16 00:14, Andrew Cooper wrote: > > On 04/04/2016 23:45, Chong Li wrote: > > > --- > > > =C2=A0xen/common/sched_credit.c=C2=A0=C2=A0| 1 + > > > =C2=A0xen/common/sched_credit2.c | 1 + > > > =C2=A02 files changed, 2 insertions(+) > > >=20 > > > diff --git a/xen/common/sched_credit.c > > > b/xen/common/sched_credit.c > > > index e5d15d8..fa6b7f0 100644 > > > --- a/xen/common/sched_credit.c > > > +++ b/xen/common/sched_credit.c > > > @@ -1101,6 +1101,7 @@ csched_dom_cntl( > > > =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=A0sdom->cap =3D op->u.credit.cap; > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0break; > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0default: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0spin_unlock_irqresto= re(&prv->lock, flags); > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return -EINVAL; > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > > > =C2=A0 > > While Dario didn't care too much how you fixed the issue, I do. > >=20 > > Please use an "int rc =3D 0" and remove remove the return statement > > (instead, assigning rc =3D -EINVAL; and a break;).=C2=A0=C2=A0It makes = far more > > readable and understandable code, which is better in the long run. > > Well Dario's a scheduler maintainer and you're not. >=20 Eheh :-) > But in any case, I also prefer the rc / break (or goto out) pattern > enough to ask for a re-send.=C2=A0=C2=A0(But I now see that a v3 has alre= ady > been > sent.) >=20 Yeah, I said I was ok in the event that we wanted to check in the fix ASAP, editing the changelog during commit. If a resend were to be done, I'd have hoped the structure to be changed as said above... I probably should have said it more explicitly. Impressive that we're all on the same page (at least, from a technical point of view! :-P) 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) --=-4cX4jUCySDWivw9eJdK8 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 iEYEABECAAYFAlcDh7cACgkQk4XaBE3IOsQ0gwCcDtkViJwRwCc7zGDBnACXJCrr dwcAnA1ndobl2WRjbCcg/LWlRN0IJHEP =Ua0c -----END PGP SIGNATURE----- --=-4cX4jUCySDWivw9eJdK8-- --===============6842053357740593795== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============6842053357740593795==--