From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 0/4] VMX: Properly handle pi descriptor and per-cpu blocking list Date: Fri, 24 Jun 2016 16:36:39 +0200 Message-ID: <1466778999.18398.107.camel@citrix.com> References: <1464269954-8056-1-git-send-email-feng.wu@intel.com> <1464283240.21930.157.camel@citrix.com> <1466631187.18398.55.camel@citrix.com> <1466764159.18398.95.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5607538822877078670==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , "Wu, Feng" , "xen-devel@lists.xen.org" Cc: "Tian, Kevin" , "keir@xen.org" , "george.dunlap@eu.citrix.com" , "andrew.cooper3@citrix.com" , "jbeulich@suse.com" List-Id: xen-devel@lists.xenproject.org --===============5607538822877078670== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-E8qJG6Du00+CvAHv53Xn" --=-E8qJG6Du00+CvAHv53Xn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2016-06-24 at 14:49 +0100, George Dunlap wrote: > On 24/06/16 14:42, Wu, Feng wrote: > > Here is my understanding, if the guest has nothing to do, it will > > call HLT, and Xen hypervisor will call vcpu_block(), if we don't > > block the vCPU and return to guest, guest will continue to run > > HLT if it still has nothing to do.=C2=A0 > As it happens, most operating systems will handle this situation just > fine; but I'm not sure this is something we want to rely on. >=20 Exactly! I indeed don't think it would be wise to rely on that. But more than that, I don't think we want to waste pCPU cycles considering runnable, and hence potentially scheduling, vCPUs that have HTL-ed! That may be acceptable in emulators like Bochs or "plain" Qemu... Xen is an hypervisor, it does virtualization, and this is one of the points of virtualization, IMO: when a virtual CPU has nothing to do, use the physical CPU to execute _another_ virtual CPU. And even if that would be just for the sake of handling a corner case, I still think that: =C2=A0- we really want to try as hard as possible to avoid it, =C2=A0- if we really can't, we want a big comment in the code for: =C2=A0 * explaining what actually happens, =C2=A0 * proving that it will be something limited in time (and preferably =C2=A0 =C2=A0 rather short), =C2=A0 * providing an explanations of why we could not do better. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-E8qJG6Du00+CvAHv53Xn 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 iQIcBAABCAAGBQJXbUV3AAoJEBZCeImluHPuFnoP/1KEiqomWeh6jmkORQkE0K7l NHhHh8nSodd4PpHSnT+HyR/WXQSt54qHSL481+EdUDu9pzt5fUX7HqUK5dc6dsyS mXKzdfNJwflsVPuuFLcFVwDIiTCIYoWmT60IcdE2Jq1pUfSa7jjTVVeRuAaxDxhh saIyMXxPhqT8kHKq9Hyggp1F8frvQlTim37G8WoVX4NBFtCISMSr6JERjP/PAkSo OBweoo3aOWG0nkvTCs3+THeG1GDheUq8MSQBJwt16+7J8IRIW3AVVA712OossWZ/ /3FBFGT3Ldr40Vi7ENPSJtz4F7H38o7wLn5nrzjfw/r151BLxUoVbT9XwTzwQ+ar 7jYu/9f/eTbM/QfOQudjFXlRNwk4kF6rfVFP6T1kSP45+sHiBhVUfPedO2txds5u uY87aBjPBWPuZzMgGpeApEBBlDl3exwDJcxm6BBcQMZfp2gkMbWiyiL754ybA/eG yysIiY83TNJYu1SnP7dTlYf+CsZqpLQFMZI1MBT9CDPr8Z5DYZfx7VRckaQz7x+y RDqhEVocXcOjrctwIA/VdBV2gFqWKXnVxbfoCWY2XzDpnube3gLLG9ntD2ydCkCM St9jhws1Fpwh61lhE4xSw1FFIQzl/nh8Blvo6pR3mK4oHY4S45T+T4NCex9lJ9vB kC9FAanlpwGzsly0kUjJ =ptjN -----END PGP SIGNATURE----- --=-E8qJG6Du00+CvAHv53Xn-- --===============5607538822877078670== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============5607538822877078670==--