From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 3/3] xen: credit1: avoid boosting vCPUs being "just" migrated Date: Thu, 11 Feb 2016 18:45:01 +0100 Message-ID: <1455212701.3148.294.camel@citrix.com> References: <20160211113321.20959.53804.stgit@Solace.station> <20160211113901.20959.87801.stgit@Solace.station> <56BC9B0502000078000D1087@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2555356804427548840==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aTvIn-0006TF-HM for xen-devel@lists.xenproject.org; Thu, 11 Feb 2016 17:45:13 +0000 In-Reply-To: <56BC9B0502000078000D1087@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 Cc: George Dunlap , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org --===============2555356804427548840== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-hnt0i/OYnZSiWKA94UUm" --=-hnt0i/OYnZSiWKA94UUm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2016-02-11 at 06:30 -0700, Jan Beulich wrote: > > > > On 11.02.16 at 12:39, wrote: > > --- a/xen/common/sched_credit.c > > +++ b/xen/common/sched_credit.c > > @@ -1022,11 +1022,14 @@ csched_vcpu_wake(const struct scheduler > > *ops, struct vcpu *vc, unsigned wf) > > =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 a couple of exceptions, when= we don't want 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=A0if ( svc->pri =3D=3D CSCHED_PRI_TS_UNDER && > > +=C2=A0=C2=A0=C2=A0=C2=A0if ( !(wf & WF_migrated) && > > +=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) ) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ >=20 > Considering the other svc->flags check done here, wouldn't it be > possible to achieve the same effect without patch 2, by having > csched_cpu_pick() set a newly defined flag, and check for it here? >=20 It can indeed. I've coded it up, and I like the way it came out better. I'm rerunning the benchmarks right now (just in case! :-)). I'll send v2 out as soon as they finish. I did like the idea of "wakeup flags", and I think they may actually turn out useful, but they're not necessary for this specific use case, as it appears. Well, next time. ;-) 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) --=-hnt0i/OYnZSiWKA94UUm 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 iEYEABECAAYFAla8yJ4ACgkQk4XaBE3IOsSNhgCfaULqrAk7hKnHN8N/qhoP/eff 9RsAniHovtmZsvC1KhlOmrT6IgAj/xlu =iDtJ -----END PGP SIGNATURE----- --=-hnt0i/OYnZSiWKA94UUm-- --===============2555356804427548840== 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 --===============2555356804427548840==--