From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 17/24] xen: credit2: soft-affinity awareness in runq_tickle() Date: Wed, 7 Sep 2016 15:31:44 +0200 Message-ID: <1473255104.19612.125.camel@citrix.com> References: <147145358844.25877.7490417583264534196.stgit@Solace.fritz.box> <147145437291.25877.11396888641547651914.stgit@Solace.fritz.box> <57C80882.90102@citrix.com> <1473087326.19612.65.camel@citrix.com> <57D01518.1090006@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5658193519358935172==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhcxi-0002d9-IG for xen-devel@lists.xenproject.org; Wed, 07 Sep 2016 13:32:22 +0000 In-Reply-To: <57D01518.1090006@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 --===============5658193519358935172== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-V7pICDqfRXvRxFvHHzq9" --=-V7pICDqfRXvRxFvHHzq9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-09-07 at 14:24 +0100, anshul makkar wrote: > On 05/09/16 15:55, Dario Faggioli wrote: > > On Thu, 2016-09-01 at 11:52 +0100, anshul makkar wrote: > > So, yes, we know already that it's running in a cpu at least from > > its > > hard affinity, what is it exactly that you are not understanding? > If I put it simply ,=C2=A0=C2=A0can=C2=A0=C2=A0(X being a vcpu) > x {soft affinity pcpus} Intersect x { hard affinity pcpu} -> be Null > or=C2=A0 > disjoint set ? > and >=20 The user can setup things such that: =C2=A0soft-affinity{X} intersection hard-affinity{X} =3D O but this, here inside the scheduler, is considered like X does not have any soft-affinity at all, i.e., only X's hard-affinity is considered, and all the balancing steps and operations and consideration related to soft-affinity are ignored/skipped. That's because it's absolutely pointless to try figure out where to execute X, among the set of the pCPUs it prefers to run on, if it _can't_ actually run on any pCPU from that same set. So the answer to your question is: "it seems to be possible for the intersection to be void, but in practise, it is not." :-) > x{runnable pcpu} intersect (x{hard affinity pcpu} union x{soft > affinity=C2=A0 > pcpu} ) -> be null or disjoint ?? >=20 I still don't get this. In particular, I'm not sure what 'x{runnable pcpu}' is. Also the union of a vcpu's soft and hard affinity is never done (it's, as explained above, the intersection that counts). Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-V7pICDqfRXvRxFvHHzq9 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 iQIcBAABCAAGBQJX0BbBAAoJEBZCeImluHPurlMP/1zIOx7qAdt1wHJyVtK3QyUp x0v1IGR20ZH8aPoiM5HLgIz2+2Z2K/jWXhELHOb6pfPbUXLGkk5i437DkxIw5Ypb l3kDc7u1JARH/amF9sC3uyUKboS/HsFOwplKVIaTHDG1Qu1Xi2aoEmnQ6Zu+KI/S egG49DoayO+eM325zWbwFadqbydRFk+tDPLHlOiKh2OJ9kmgnFn0776bkUapjVkG b9CygvkZ3Y2q5L54E/9IS7EWpuks22kfaNkhbwHfbQ9uU7jdMYwZyCMfdweZUe/S BlDwYeowlW0OeJoH9rDb5+YWqMi6/fmfR4tmbSpVN1R1N0s8Nt/chiy9HMFTF7Kl ojC4lBx2QD8aftc97EwxRhz69oQI+fiMCKy1DSqOXwyyWpWJ5y4Xr4cGGbNr8nBp 1JBAXsFbRGkx650vkfSu4CaK8pi3AddPliB6iZcS8E+p/kM3Z853mDcmyWekMXKC P3mrkbh2qV+eGNaOW3gyygXgiYIHOgQW6QLkWYxgijPNcsB6QQW5srzw7IipAEBL SKvCMSTs8XVDvmGZShFG/MXuy9+JhQbQ+VGgyH7HBuMXJDKFcEyl0ACqOJO/dRWA JMRcBW/QVksrL5P9X5u3P1VBH3DbldO0DbU5GfSZ1nV8T5yyoRXK6GQ8NRBpFQo/ 3api75hmqp4CjD0NVTPv =9HBA -----END PGP SIGNATURE----- --=-V7pICDqfRXvRxFvHHzq9-- --===============5658193519358935172== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============5658193519358935172==--