From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v7 15/17] vmx: VT-d posted-interrupt core logic handling Date: Mon, 21 Sep 2015 16:11:46 +0200 Message-ID: <1442844706.2691.79.camel@citrix.com> References: <55FFCB67.3050900@citrix.com> <1442842304.2691.67.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7228279783572401691==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Wu, Feng" , George Dunlap Cc: "Tian, Kevin" , Keir Fraser , George Dunlap , Andrew Cooper , "xen-devel@lists.xen.org" , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============7228279783572401691== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-xjiOo2QD2Tbd7PXVNti5" --=-xjiOo2QD2Tbd7PXVNti5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2015-09-21 at 13:50 +0000, Wu, Feng wrote: >=20 > > -----Original Message----- > > From: Dario Faggioli [mailto:dario.faggioli@citrix.com] > > Note that, in case of preemptions, we are switching from a non-idle > > vcpu to another, non-idle, vcpu, so lazy context switching to the > > idle > > vcpu should not have much to do with this case...=20 >=20 > So do you mean in preemptions, we cannot switch from non-idle to idle > or > Idle to non-idle, i.e, we can only switch from non-idle to non-idle? >=20 That's what I meant. It's the definition of 'preemption' and of 'idle task/vcpu', AFICT. I mean, the idle vcpu has the lowest possible priority ever, so it can't really preempt anyone. OTOH, if the idle vcpu is running, that means there weren't any active vcpus because, e.g., all were blocked; therefore, any active vcpu wanting to run would have to wake up (and hence go throught the proper wake up logic) before trying to preempt idle. There is one possible caveat: tasklets. In fact (as you can check yourself by looking, in the code, for tasklet_work_scheduled), it is possible that we force the idle vcpu to execute, even when we have active and runnable vcpus, to let it process tasklets. I'm not really sure whether this could be a problem for you or not, can you have a look (and/or, a try) and report back? Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-xjiOo2QD2Tbd7PXVNti5 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 v1 iEYEABECAAYFAlYAECIACgkQk4XaBE3IOsRaVQCfRZewpZB24DFNxuaSkenTpGi2 c0YAn15AIqg9vd9wVci0PIcPABjkGvWh =T8z9 -----END PGP SIGNATURE----- --=-xjiOo2QD2Tbd7PXVNti5-- --===============7228279783572401691== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7228279783572401691==--