From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 5/9] xen: sched: make implementing .alloc_pdata optional Date: Thu, 1 Oct 2015 10:13:09 +0200 Message-ID: <1443687189.3276.201.camel@citrix.com> References: <20150929164726.17589.96920.stgit@Solace.station> <20150929165604.17589.24387.stgit@Solace.station> <560D01A302000078000A752D@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7333071885794832248==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZhYzt-0001X9-7A for xen-devel@lists.xenproject.org; Thu, 01 Oct 2015 08:13:49 +0000 In-Reply-To: <560D01A302000078000A752D@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: George Dunlap , xen-devel@lists.xenproject.org, Josh Whitehead , Robert VanVossen List-Id: xen-devel@lists.xenproject.org --===============7333071885794832248== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-5m7Z20jeplMNyUTHIh7R" --=-5m7Z20jeplMNyUTHIh7R Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2015-10-01 at 01:49 -0600, Jan Beulich wrote: > > > > On 29.09.15 at 18:56, wrote: > > @@ -1501,8 +1501,8 @@ int schedule_cpu_switch(unsigned int cpu, > > struct cpupool *c) > > return 0; > > =20 > > idle =3D idle_vcpu[cpu]; > > - ppriv =3D SCHED_OP(new_ops, alloc_pdata, cpu); > > - if ( ppriv =3D=3D NULL ) > > + if ( (new_ops->alloc_pdata !=3D NULL) && > > + ((ppriv =3D new_ops->alloc_pdata(new_ops, cpu)) =3D=3D NULL) = ) > > return -ENOMEM; >=20 > I think this should be solved without open coding SCHED_OP(): > Make use of the helpers in xen/err.h and have NULL become a > variant of success. > I see. There are other occurrences of the open coded variant, so I just went for it for the sake of this patch. But yes, I guess I can have a look at what you suggest, add a preparatory which does that to the series, and convert all existing cases (and then, of course, use the same approach when I get to this one). 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) --=-5m7Z20jeplMNyUTHIh7R 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 iEYEABECAAYFAlYM6xUACgkQk4XaBE3IOsSrgwCePPvdQ1rEiANg4Y7C78yUES72 gRQAn35LuT85Olm6O1Ue3V2fooY67l7R =h/f6 -----END PGP SIGNATURE----- --=-5m7Z20jeplMNyUTHIh7R-- --===============7333071885794832248== 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 --===============7333071885794832248==--