From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1/2] sched: credit2: respect per-vcpu hard affinity Date: Mon, 2 Feb 2015 11:12:49 +0000 Message-ID: <1422875569.6247.7.camel@Abyss> References: <1417307606-2950-1-git-send-email-jtweaver@hawaii.edu> <1417307606-2950-2-git-send-email-jtweaver@hawaii.edu> <1421085938.26034.65.camel@Abyss.station> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0301282941336834771==" 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: Justin Weaver Cc: George Dunlap , Henri Casanova , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============0301282941336834771== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-nupFIV/Z6uRV2ayVopmh" --=-nupFIV/Z6uRV2ayVopmh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2015-01-31 at 20:51 -1000, Justin Weaver wrote: > On Mon, Jan 19, 2015 at 9:21 PM, Justin Weaver wrot= e: > > Like I said above, I will look at this again. My VMs were getting > > stuck after certain hard affinity changes. I'll roll back some of > > these changes and test it out again. >=20 > I discovered that SCHED_OP(VCPU2OP(v), wake, v); in function vcpu_wake > in schedule.c is not being called because v's pause flags has > _VPF_blocked set. >=20 > For example... > I start a guest with one vcpu with hard affinity 8 - 15 and xl > vcpu-list says it's running on pcpu 15 > I run xl vcpu-pin 1 0 8 to change it to hard affinity only with pcpu 8 > When it gets to vcpu_wake, it tests vcpu_runnable(v) which is false > because _VPF_blocked is set, so it skips the call to > SCHED_OP(VCPU2OP(v), wake, v); and so does not get a runq_tickle > xl vcpu-list now shows --- for the state and I cannot console into it > What I don't understand though is if I then enter xl vcpu-pin 1 0 15 > it reports that _VPF_blocked is NOT set, vcpu_wake calls credit2's > wake, it gets a runq_tickle and everything is fine again > Why did the value of the _VPF_blocked flag change after I entered xl > vcpu-pin the second time?? I dove deep in the code and could not > figure it out. >=20 > So that is why v1 of my patch worked because I let it run migrate > during an affinity change even if the current and destination run > queues were the same, so it would do the processor assignment and > runq_tickle regardless. I think you'll have to tell me if that's a > hack or a good solution! >=20 Ok, thanks for the analysis. I shall have a look and let you know. Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-nupFIV/Z6uRV2ayVopmh 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 iEYEABECAAYFAlTPW7EACgkQk4XaBE3IOsRptACfblgLZKjBfTycFlSESvkv0gCi vFsAnRkjII9rcXqKzkRTJRsgryf5QQSM =xm7L -----END PGP SIGNATURE----- --=-nupFIV/Z6uRV2ayVopmh-- --===============0301282941336834771== 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 --===============0301282941336834771==--