From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 2/3] xen: Have schedulers revise initial placement Date: Mon, 18 Jul 2016 12:28:33 +0200 Message-ID: <1468837713.13039.138.camel@citrix.com> References: <1468605722-24239-1-git-send-email-george.dunlap@citrix.com> <1468605722-24239-2-git-send-email-george.dunlap@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1891185794023241782==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP5my-0002sa-8u for xen-devel@lists.xenproject.org; Mon, 18 Jul 2016 10:28:40 +0000 In-Reply-To: <1468605722-24239-2-git-send-email-george.dunlap@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , xen-devel@lists.xenproject.org Cc: Anshul Makkar , Meng Xu , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============1891185794023241782== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-+czGcyHrj6qLZSbSbEbP" --=-+czGcyHrj6qLZSbSbEbP Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2016-07-15 at 19:02 +0100, George Dunlap wrote: > The generic domain creation logic in > xen/common/domctl.c:default_vcpu0_location() attempts to try to do > initial placement load-balancing by placing vcpu 0 on the least-busy > non-primary hyperthread available.=C2=A0=C2=A0Unfortunately, the logic ca= n end > up picking a pcpu that's not in the online mask.=C2=A0=C2=A0When this is = passed > to a scheduler such which assumes that the initial assignment is > valid, it causes a null pointer dereference looking up the runqueue. >=20 > Furthermore, this initial placement doesn't take into account hard or > soft affinity, or any scheduler-specific knowledge (such as historic > runqueue load, as in credit2). >=20 > To solve this, when inserting a vcpu, always call the per-scheduler > "pick" function to revise the initial placement.=C2=A0=C2=A0This will > automatically take all knowledge the scheduler has into account. >=20 > Signed-off-by: George Dunlap > --- > CC: Dario Faggioli > CC: Anshul Makkar > CC: Meng Xu > CC: Jan Beulich > Reviewed-by: Dario Faggioli Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-+czGcyHrj6qLZSbSbEbP 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 iQIcBAABCAAGBQJXjK9RAAoJEBZCeImluHPubAYP/ApEUl1/Ibg8VSWw/m64+n3Z nxaSux+fPMVIm7m/kIwfcT+Y/46IzxoXZlmIgKYaxbwn6BqQNZhR5+4QCG7e+1j+ U4nR+v5DKCcHB0g18crIbYKpzzP6r+L7fgrJcEwJ/xsX22nTrXeEED5VmcV+6aDM pA9JuVNBdl/YlIP7XBSAo/91yhYUT56JulDm7RB6vGN+sGtV37+dmA/ZGJ1Fjo41 jc/hiMgjJOp17A2IRwAAiZUPzyQmy9OFhVrBSludOC1fTHwP7yxSpsVzY23lv2ws /WTA5oy+TmWXrfMLV3+u6wB3K3mqhh0yit4GOmVh6FrH0PU1SZJAcMAbZ5dOuO6F iJLmXD7SSho2B8WY+iPBa+7gY1q0oDkeeRuaiZm/vfqS+wbpwemYiEDMZGnWOozZ 4A2/k9KuloKRM8wjJKTQzOyZrUmbWQ7w0Xxo3eQMBNiXkWV57gExnoB7ILyQ+1aN XW9qOFiwNqpc2haGmjPZT8Y4lD+Z1Nw7dhe7JCbAp2EqJEMSVvtMRLgUqmCF0YPI qBiY86va7zWIz1g1tJasth/PBUw3hz323wpxSqGP2yRuWmghSAAiXRUoj0HCYKMF Ajv+UvH9/oihJpa+qNVIO3Z7inIXmagUsYT1w6kJruBJ/SK7kqi9GF2Ij2KDbH1q 2aN7Y11prcTEUe1DmDKT =VVY2 -----END PGP SIGNATURE----- --=-+czGcyHrj6qLZSbSbEbP-- --===============1891185794023241782== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============1891185794023241782==--