From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1/7] xen: sched: factor affinity helpers out of sched_credit.c Date: Fri, 23 Jun 2017 15:33:00 +0200 Message-ID: <1498224780.12549.1.camel@citrix.com> References: <149762114626.11899.6393770850121347748.stgit@Solace.fritz.box> <149762242283.11899.2127034224965071833.stgit@Solace.fritz.box> <0fe6e31a-21ed-8423-7456-3e77f3d12401@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1561549254823976541==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOOhx-0005lV-Jj for xen-devel@lists.xenproject.org; Fri, 23 Jun 2017 13:33:09 +0000 In-Reply-To: <0fe6e31a-21ed-8423-7456-3e77f3d12401@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Anshul Makkar , xen-devel@lists.xenproject.org Cc: "Justin T. Weaver" , George Dunlap List-Id: xen-devel@lists.xenproject.org --===============1561549254823976541== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-tEipAONsa3GfHTjCDT65" --=-tEipAONsa3GfHTjCDT65 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-06-23 at 11:02 +0100, Anshul Makkar wrote: > On 16/06/2017 15:13, Dario Faggioli wrote: > > diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c > > index efdf6bf..53773df 100644 > > --- a/xen/common/sched_credit.c > > +++ b/xen/common/sched_credit.c > > @@ -136,27 +136,6 @@ >=20 > * > > + * Hard affinity balancing is always necessary and must never be > > skipped. > > + * But soft affinity need only be considered when it has a > > functionally > > + * different effect than other constraints (such as hard affinity, > > cpus > > + * online, or cpupools). > > + * > > + * Soft affinity only needs to be considered if: > > + * * The cpus in the cpupool are not a subset of soft affinity >=20 > do you mean cpus in a cpupool are not in a subset of the soft > affinity=C2=A0 > of a vcpu which is a runnable state ? > Err... not sure. It's probably the same. IAC, what this means is that, if a vcpu is in cpupool C, and the cpus of cpupool C are 1,2,3 _and_ the soft affinity of the vcpu is 0,1,2,3,4,5 then, it does not make sense to check soft-affinity. In fact, the vcpu will only execute on either 1,2 or 3, which are all part of its soft-affinity anyway. And it should be exactly that the cpupool is *a* *subset* of the soft- affinity. In fact, if cpupool is 1,2,3 and soft-affinity is 0,1,3,4,5 then it _does_ make sense to check soft affinity,, to try not to run the vcpu on 2. Hope this clarify things. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-tEipAONsa3GfHTjCDT65 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 iQIcBAABCAAGBQJZTRiMAAoJEBZCeImluHPuiFcQAJ3kfHGXykEfOZ2U56QMgG+l QFIQRAp4Uf32P2cCAUBcwqPflNiH/JWUkKNruEKY31nLT7bIDgBka+oMG8ZbKV8e Tr2ZDzrgDxYWqdWMimZmf7xYOwStOzd1pMfc9CU1TIHgGUW9/JoIcpkRmx8rqDnG hYtzaT7knhvBKOH0fMPPpEsXeuNtD+QqVLiMsPyuCVilFtdQrXSaBm08yVQgD0jm MPSN0HNWKCaXue9qJXBupSqi0asdPC+z6bjzDyL6C+kdQOvoFLGgRz9eAFrZ+mAu zPsK3X8RQZIE8OzZ3eAg/qJ8zbCXQIt/shAVP/XVoqtGZpQ1ucSFXGJM5kF4zLxL Zl1mdDaqzjYI3OUxk8RQl0aSn2m2s2lJXtLbOIqzFbkMcqX7SS9exjIrtNohEje4 WWsLrKPGSm8wdA1f0xdWlRX0inqyXQkt3h5GzG5bBNRz75XBFc5q6w8nzfjdXQT8 yKYgOTJmcjMg1epxcocdB1P5KX0I1vzgJQI1q89GW6p2RxPnpMrGme2c9FwiVISb QMr8qDk4A72SK4QCPQM5kzU6+CWdxPgWVgz9MCpvrLX/LSXXVdfrwXUO7uUsh531 KcXfzPSzY5d/rCzQw3BkUo89h2Lvzq+xtK2aBb4N8XMyHouRW/WA3qlAcoFrjE3z L2/Si4T0qFPGWf6TFRnt =H1Jx -----END PGP SIGNATURE----- --=-tEipAONsa3GfHTjCDT65-- --===============1561549254823976541== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============1561549254823976541==--