From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] xen: sched: don't call hooks of the wrong scheduler via VCPU2OP Date: Fri, 17 Mar 2017 12:46:43 +0100 Message-ID: <1489751203.15340.1.camel@citrix.com> References: <148969985491.18518.5789656764002800021.stgit@Palanthas.fritz.box> <791f6a11-6a3c-63e3-b9e8-0941aa3b1fee@suse.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3057645858316915241==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coqLv-0008E9-Sv for xen-devel@lists.xenproject.org; Fri, 17 Mar 2017 11:47:27 +0000 In-Reply-To: <791f6a11-6a3c-63e3-b9e8-0941aa3b1fee@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Juergen Gross , xen-devel@lists.xenproject.org Cc: George Dunlap , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============3057645858316915241== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-0pE8PXgGabQt0gV0Bec2" --=-0pE8PXgGabQt0gV0Bec2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-03-17 at 06:28 +0100, Juergen Gross wrote: > On 16/03/17 22:30, Dario Faggioli wrote: > > [..] > > Fix this by taking care, in VCPU2OP, of the case > > when the vcpu is an idle one. > >=20 > > Signed-off-by: Dario Faggioli >=20 > Reviewed-by: Juergen Gross >=20 Thanks. I won't apply this tag to v2 though, as I'm changing the patch a bit, as a result of Jan's comment. > ... with or without the remark below addressed. >=20 About this... > > --- a/xen/common/schedule.c > > +++ b/xen/common/schedule.c > > @@ -78,7 +78,19 @@ static struct scheduler __read_mostly ops; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0: (ty= peof((opsptr)->fn(opsptr, ##__VA_ARGS__)))0 ) > > =C2=A0 > > =C2=A0#define DOM2OP(_d)=C2=A0=C2=A0=C2=A0=C2=A0(((_d)->cpupool =3D=3D = NULL) ? &ops : ((_d)- > > >cpupool->sched)) > > -#define VCPU2OP(_v)=C2=A0=C2=A0=C2=A0(DOM2OP((_v)->domain)) > > +static inline struct scheduler* VCPU2OP(const struct vcpu *v) >=20 > Rename, e.g. get_scheduler() ? >=20 I indeed like the idea, and will do that. But in another patch (which I'll include when posting v2). In fact, since I want this to be backported, I don't want to change too much code around, making future backports more difficult. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-0pE8PXgGabQt0gV0Bec2 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 iQIcBAABCAAGBQJYy8yjAAoJEBZCeImluHPuExMQAKGVdHqhQE7I+tujcK5T7pZX DnacAGQkxpQRk5wMbhc+Gd0v/NUiQU7pXVWHv2j3CkGuqF1dMHH5T6xSkRLpIlOG WOKnLwX0Ia3UXI7mc8b377PJsDPMh3BWdZ7uGfQqKNHzEzzVkd67e/fm9G0xDG4D wZm4a3CuJsvv35/HFc2jCoRjBKra1v/i41Qik+1HndInnNUMzKwWPJpnEh7LuNEN VZLb1H8cdUYYM09YWRWxqmNOzVmFW6mFfsPM3AHj76wXU6QWpDKj6Ye0d2N6Hy/F L9maCZ3jpkGCMKrfRiHmApSh7vJvsv3ip2ooES6TgsxLJ2qlPiE9UUE76520w3OG t36Q8w0KjwQAhXNKJw9pFyVIzFNYMxfLdDjoexopiojAJDP//725hGrR+OMapKE8 obpuKGlSz4+nA2RFl8U+mxMqUZBswzkGrRaY5RT6y6a7zImB0j/fbdDevM6oxEOs 2BbfqPP44Zr+UC4kOBz77UYJBay6dwA6HBqcmkH4atdlyiylS70nkWo5+R6Rawvg HtN13+V/vJ/as2b/K/H1qI7gkiXJRpOB/6cVxdKVgP+Oba8Z2KYjw1Z5iL512EcU d+6ju6QE8ddZ4YMI7AEKnHVe4LSMhKMSoaM//l1HCb9OlogLtJSrg2ejsIpSY7sA WgO/3j6uWeQ7/2MvlZ1w =dDJO -----END PGP SIGNATURE----- --=-0pE8PXgGabQt0gV0Bec2-- --===============3057645858316915241== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============3057645858316915241==--