From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 4/5] xen: sched_null: support for hard affinity Date: Fri, 7 Apr 2017 12:11:11 +0200 Message-ID: <1491559871.3287.6.camel@citrix.com> References: <149152426922.31941.6054159629649244529.stgit@Solace.fritz.box> <149152525510.31941.6625917268878264420.stgit@Solace.fritz.box> <2686af52-6e38-61ab-c727-0e9b99740a98@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9056673440525342787==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwQrP-0001Sf-N8 for xen-devel@lists.xenproject.org; Fri, 07 Apr 2017 10:11:19 +0000 In-Reply-To: <2686af52-6e38-61ab-c727-0e9b99740a98@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: Stefano Stabellini , Jonathan Davies , Julien Grall , Marcus Granado List-Id: xen-devel@lists.xenproject.org --===============9056673440525342787== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-dwRWT54p8OJ+UgpU2isA" --=-dwRWT54p8OJ+UgpU2isA Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-04-07 at 11:08 +0100, George Dunlap wrote: > On 07/04/17 01:34, Dario Faggioli wrote: > > @@ -413,7 +431,6 @@ static void null_vcpu_insert(const struct > > scheduler *ops, struct vcpu *v) > > =C2=A0static void _vcpu_remove(struct null_private *prv, struct vcpu *v= ) > > =C2=A0{ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0unsigned int cpu =3D v->processor; > > -=C2=A0=C2=A0=C2=A0=C2=A0struct domain *d =3D v->domain; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct null_vcpu *wvc; > > =C2=A0 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ASSERT(list_empty(&null_vcpu(v)->waitq_el= em)); > > @@ -425,7 +442,7 @@ static void _vcpu_remove(struct null_private > > *prv, struct vcpu *v) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* If yes, we assign it to cpu, in s= pite of v. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*/ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wvc =3D list_first_entry_or_null(&prv->wa= itq, struct null_vcpu, > > waitq_elem); > > -=C2=A0=C2=A0=C2=A0=C2=A0if ( wvc && cpumask_test_cpu(cpu, cpupool_doma= in_cpumask(d)) ) > > +=C2=A0=C2=A0=C2=A0=C2=A0if ( wvc && vcpu_check_affinity(wvc->vcpu, cpu= ) ) >=20 > Hmm, actually I just noticed that this only checks the first item on > the > list.=C2=A0=C2=A0If there are two vcpus on the list, and the first one do= esn't > have affinity with the vcpu in question, the second one won't even be > considered.=C2=A0=C2=A0This was probably OK in the previous case, where t= he > only > time the test could fail is during suspend/resume, but it's not > really > OK anymore, I don't think. >=20 Good point. I need to scan the waitqueue. Will do. > Everything else looks OK to me. >=20 Good to hear. :-) Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-dwRWT54p8OJ+UgpU2isA 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 iQIcBAABCAAGBQJY52XAAAoJEBZCeImluHPudy8P/2PCf2jdWZBEiBdzvaEuMhQE wBhBGL9e7v0vDWreiXnPN/ekPeLQniNAGx0IiKJiDe+Bal0c4+1/GVPbDcbRu3sf nRhzAf4SS2TS6GNjcz064SpJ4l68pzUFVpCjRfezLaIXy2fZ+DRzeVBfjcP4DG7q bXppWUXIs1ArtdbP7CCCpkRKVn/4CQbgLCNbR3mmynASyN57Y/n+yv7PeL8iNyXz pTdr/wIpPUez9D0FgNEkjWKhtrx9sk2CjjY5wkzv0ffW0kgGjjCVMvQLFQeKKCiZ x2PEagbNsTWKzJpju5+IndFhM3bfW5PBon4sFVQ4yEKnJH52pqThgoF1HIX7p7Fb eL3xeZd71kmPpcXJKxTKXZrsmL10GHUJMe5dNHEKOreCI/2ArAFyr98Xq/kcYwRv KIoUtlougu0oMPtgo21cj+s7CTjGuy1h411hAiVux7etvffp7YrM45jvvfV8BUsI A4J/CcyNQoebDmDseNQ58hhj9yI1zGOqK8FdM8QuqaiD94knzwIuSTuoNF0b7+HZ d+e/nQdNP70U5S5Gphzj2K1gdTIWmqJ1/lLkzgpSbrG8rpk1s9QjPiF6FfoZbIh0 wJV6Wq6rTUSss/8l2Dx3pip9rATBif1MCYqNlawd+WERNGU59WRVuV2euozcdJQQ tYj/qwmayj6CCPkV+1fq =cZny -----END PGP SIGNATURE----- --=-dwRWT54p8OJ+UgpU2isA-- --===============9056673440525342787== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============9056673440525342787==--