From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 2/2] xen: credit1: avoid boosting vCPUs being "just" migrated Date: Wed, 24 Feb 2016 12:12:14 +0100 Message-ID: <1456312334.17312.14.camel@citrix.com> References: <20160212162338.25796.17618.stgit@Solace.station> <20160212162926.25796.58870.stgit@Solace.station> <56CD8947.4050307@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5694592384125532873==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYXMl-00013e-K1 for xen-devel@lists.xenproject.org; Wed, 24 Feb 2016 11:12:23 +0000 In-Reply-To: <56CD8947.4050307@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 , xen-devel@lists.xenproject.org Cc: George Dunlap , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============5694592384125532873== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Dx6Rfh+5y6C7cuf+b8Sw" --=-Dx6Rfh+5y6C7cuf+b8Sw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-02-24 at 10:43 +0000, George Dunlap wrote: > On 12/02/16 16:29, Dario Faggioli wrote: > >=C2=A0 > > @@ -1022,11 +1037,18 @@ csched_vcpu_wake(const struct scheduler > > *ops, struct vcpu *vc) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* more CPU resource intensive VCPUs= without impacting > > overall=C2=A0 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* system fairness. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* The one exception is for VCPUs of capp= ed domains unpausing > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* after earning credits they had overspe= nt. We don't boost > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* those. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* There are two cases, when we don't wan= t to boost: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0=C2=A0- VCPUs that are waking up = after a migration, rather than > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0=C2=A0=C2=A0=C2=A0after having bl= ock; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0=C2=A0- VCPUs of capped domains u= npausing after earning credits > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0=C2=A0=C2=A0=C2=A0they had oversp= ent. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Note that checking whether we are "onl= y" migrating must be > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* done up front, as we do not want the c= learing of the bit we > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* set in csched_cpu_pick() to be short-c= ircuited away. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*/ > > -=C2=A0=C2=A0=C2=A0=C2=A0if ( svc->pri =3D=3D CSCHED_PRI_TS_UNDER && > > +=C2=A0=C2=A0=C2=A0=C2=A0if ( !test_and_clear_bit(CSCHED_FLAG_VCPU_MIGR= ATING, &svc- > > >flags)=C2=A0=C2=A0&& > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0svc->pri =3D=3D = CSCHED_PRI_TS_UNDER && > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0!test_bit(C= SCHED_FLAG_VCPU_PARKED, &svc->flags) ) >=20 > Sorry to be late reviewing this. >=20 No problem. Thanks for getting to it, actually, as I've got a few more patches stacked on top of these outstanding series. > So we always want to clear the 'migrating' flag, regardless of > whether > we do anything with boosting.=C2=A0=C2=A0Would that logic be clearer if w= e > cleared > it as a separate step, storing the result in a local variable?=C2=A0=C2= =A0E.g.: >=20 > bool migrating; >=20 > ... >=20 > /* Always clear migrating flag if it's set */ > migrating =3D test_and_clear_bit(...) >=20 > if ( !migrating && ...) { > } >=20 > Then we wouldn't need the last paragraph in the comment. >=20 Yes, I think I like this better. > That said, this is v3, so if you'd rather just get this in as it is, > then you can have my Acked-by as well. >=20 No, I'll resend... If I make (only) this change, can I resend directly with your Acked-by? 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) --=-Dx6Rfh+5y6C7cuf+b8Sw 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 iEYEABECAAYFAlbNkA8ACgkQk4XaBE3IOsQOxwCgi/NRKbA2V8rEI7cmV/g1b/IM XLoAoIdWS/pb296dHU9TZ4l1gJqdt3pg =ixUU -----END PGP SIGNATURE----- --=-Dx6Rfh+5y6C7cuf+b8Sw-- --===============5694592384125532873== 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 --===============5694592384125532873==--