From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: vmx: VT-d posted-interrupt core logic handling Date: Thu, 10 Mar 2016 12:21:59 +0100 Message-ID: <1457608919.3102.496.camel@citrix.com> References: <1456714816-3876-1-git-send-email-feng.wu@intel.com> <20160307155304.GD5402@localhost.localdomain> <56DEBF4B.7060606@citrix.com> <56DF00D902000078000DA7C1@prv-mh.provo.novell.com> <56DF066B.3090106@citrix.com> <56DF195902000078000DA8C1@prv-mh.provo.novell.com> <56DF1C3E.1070101@citrix.com> <56E0359702000078000DAD52@prv-mh.provo.novell.com> <56E04DF8.5000801@citrix.com> <56E1394802000078000DB155@prv-mh.provo.novell.com> <56E146F402000078000DB1EA@prv-mh.provo.novell.com> <56E157EB02000078000DB2D3@prv-mh.provo.novell.com> <56E153DD.3080309@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8478647704201729088==" Return-path: In-Reply-To: <56E153DD.3080309@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , Jan Beulich , Kevin Tian Cc: Lars Kurth , Feng Wu , George Dunlap , Andrew Cooper , Ian Jackson , "xen-devel@lists.xen.org" , David Vrabel List-Id: xen-devel@lists.xenproject.org --===============8478647704201729088== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-BciQHse0vhsD3SHhZE6C" --=-BciQHse0vhsD3SHhZE6C Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2016-03-10 at 11:00 +0000, George Dunlap wrote: > > > > > On 10.03.16 at 11:05, wrote: > > > > =C2=A0From: Tian, Kevin > > > > Sent: Thursday, March 10, 2016 5:20 PM > > > >=C2=A0 > > > Actually after more thinking, there is no hard requirement that > > > the vcpu must block on the pcpu which is configured in 'NDST' > > > of that vcpu's PI descriptor. What really matters, is that the > > > vcpu is added to the linked list of the very pcpu, then when PI > > > notification comes we can always find out the vcpu struct from > > > that pcpu's linked list. Of course one drawback of such placement > > > is additional IPI incurred in wake up path. > > >=20 > > >=C2=A0 > Re "an IPI is sent to PCPU1", all that should be transparent to the > PI > code -- it already calls vcpu_unblock(), which will call vcpu_wake(), > which calls the scheduling wake code, which will DTRT. >=20 Exactly. In fact, whether there will be any IPI involved is under control of the scheduler, rather than of PI code, even right now. In fact, no matter in what pCPU's blocked list a vCPU is, it is the 'tickling' logic (for all Credit, Credit2 and RTDS) that really decides on which pCPU the vCPU should wakeup, and send the IPI, if that is not the pCPU we're running on. It can be argued that having a vCPU in the blocked list of the pCPU where it was running when it blocked could be a good thing, because it may then be able to restart running there when waking, which may have positive cache effects, etc. But that is not at all guaranteed. In fact, it could well be the case in fairly idle systems, but under high load and/or if hard and soft affinity are in use (which may well be the case, .e.g, on large NUMA servers), that isn't necessarily true, and we should not base on such assumption. > FWIW I have much less objection to this sort of solution if it were > confined to the PI arch_block() callback, rather than something that > required changes to the schedulers. >=20 Same here, and I think this can well be done in such a way... Worth a shot, IMO. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-BciQHse0vhsD3SHhZE6C 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 iEYEABECAAYFAlbhWNcACgkQk4XaBE3IOsQ2IwCgiKtjQd3DDM77/b1iHFz+Ssjr 5wQAoK1QIdojZq7/Uy1/0lm///YLjo9X =izsJ -----END PGP SIGNATURE----- --=-BciQHse0vhsD3SHhZE6C-- --===============8478647704201729088== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============8478647704201729088==--