From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 2/2] xen: sched: improve robustness (and rename) DOM2OP() Date: Thu, 6 Apr 2017 12:59:01 +0200 Message-ID: <1491476341.18721.16.camel@citrix.com> References: <148977465656.22479.5382577625088079334.stgit@Palanthas.fritz.box> <148977478448.22479.13625390869019347980.stgit@Palanthas.fritz.box> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8629105610804449171==" 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 1cw589-000070-2a for xen-devel@lists.xenproject.org; Thu, 06 Apr 2017 10:59:09 +0000 In-Reply-To: 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: Juergen Gross , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============8629105610804449171== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-V08M9w9wojkJgmkhfZkW" --=-V08M9w9wojkJgmkhfZkW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2017-03-27 at 14:23 +0100, George Dunlap wrote: > On 17/03/17 18:19, Dario Faggioli wrote: > > --- a/xen/common/schedule.c > > +++ b/xen/common/schedule.c > > @@ -77,8 +77,25 @@ 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(( (opsptr)= ->fn !=3D NULL ) ? (opsptr)->fn(opsptr, > > ##__VA_ARGS__ )=C2=A0=C2=A0\ > > =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 > > -#define DOM2OP(_d)=C2=A0=C2=A0=C2=A0=C2=A0(((_d)->cpupool =3D=3D NULL)= ? &ops : ((_d)- > > >cpupool->sched)) > > -static inline struct scheduler *VCPU2OP(const struct vcpu *v) > > +static inline struct scheduler *dom_get_scheduler(const struct > > domain *d) >=20 > Hmm -- I agree that VCPU2OP is probably not the right name, but I'm > not > a fan of the new name either; and I don't have an option I like > better yet. >=20 Maybe: domain_scheduler() vcpu_scheduler() or dom_scheduler() vcpu_scheduler() I.e., basically getting rid of the 'get' part, which may misleadingly hint at some kind of reference counting. Or, also trading 'scheduler' for 'ops': dom_ops() vcpu_ops() This is all I can come up with, my preference being {dom,vcpu}_scheduler(). Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-V08M9w9wojkJgmkhfZkW 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 iQIcBAABCAAGBQJY5h91AAoJEBZCeImluHPu2FwP/1Z89cV5no3JNECnT9m1+6rd h8+ya5sTuoORvsHJV+tfyh6Pm218VnAeYbiJRDEpBe9COvl1A0zGWOa6mAQzGwzE 5Ozkl6GB0sp79+M6njTudH3inVB3sIaRTjaD3dvxd7IVwQcjfxOFaPMQZSqK9ROj Te4KDA9SF/TekhetNpzrXMVQ9VbnOM8KfxRCZC69n8RpCcOAUavS4FwA0Vfb9xf+ io7bE9eRfAeky7/OvYw3KwrJFuj//UQxKICFZe3V/C4irt/BxKfJz2Ey57u/ghuY nfRc5h69pfAAO9OHIdeDrK0nQoZb44xgkz+bfKruAl2gBHTVtGY+8GSZdtHGyk2X Z+f3Jo5NFmTNLrETl9F9+aBoRdUbShxPmFCLwzs7Vov/QECMZgy6Ysq+R0i4Vy9a //CWkze7qlxNJ3M/KZ9JDEjoTcVlNTvQ0SU9UgZJsE+CFzCmMLHcGVn5uT1105Ww CWrthz/1vKcWw73IF5vGAMKgsnraU/eYsj5ZhjyxVlRQuji3GJiJuAEgGP6IGBh3 RFJ+2h5BVI+RYsFgN0EqiS3CkfrXtRVOTziE3bGUPxr+shjZkeeuJ9WWiGKyFgFQ r5E1aEsBIsBmDaoeItDniTfQiOalisKbGBRtzHK1W+mjhV64SOU2EUg4qJ8G9dJh TFkSmoJsmmdEg1Su89s3 =3BJy -----END PGP SIGNATURE----- --=-V08M9w9wojkJgmkhfZkW-- --===============8629105610804449171== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============8629105610804449171==--