From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v1 2/3] sched_credit2.c : runqueue_per_core code Date: Thu, 12 Mar 2015 16:35:10 +0000 Message-ID: <1426178107.7023.64.camel@citrix.com> References: <20150312145736.GA8478@gmail.com> <5501CB270200007800069467@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3192301328914186759==" Return-path: In-Reply-To: <5501CB270200007800069467@mail.emea.novell.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "JBeulich@suse.com" Cc: "xen-devel@lists.xen.org" , George Dunlap , "uma.sharma523@gmail.com" List-Id: xen-devel@lists.xenproject.org --===============3192301328914186759== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-eIY9Mjn++qr01ab4TgyJ" --=-eIY9Mjn++qr01ab4TgyJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2015-03-12 at 16:21 +0000, Jan Beulich wrote: > >>> On 12.03.15 at 15:57, wrote: > > @@ -1940,10 +1946,14 @@ static void init_pcpu(const struct scheduler *o= ps, int cpu) > > =20 > > /* Figure out which runqueue to put it in */ > > /* NB: cpu 0 doesn't get a STARTING callback, so we hard-code it t= o runqueue 0. */ > > - if ( cpu =3D=3D 0 ) > > - rqi =3D 0; > > + if ( opt_credit2_runqueue =3D=3D CREDIT2_OPT_RUNQUEUE_SOCKET ) > > + { > > + rqi =3D (cpu) ? cpu_to_socket(cpu) : boot_cpu_to_socket(); > > + } > > else > > - rqi =3D cpu_to_socket(cpu); > > + { > > + rqi =3D (cpu) ? cpu_to_core(cpu) : boot_cpu_to_core(); > > + } >=20 > Rather than extending the bad assumption of CPU 0 being the boot > CPU (What if it gets offlined and this or another one onlined back > as CPU 0?), can't you find a way to avoid depending on the numeric > value of "cpu"? >=20 This is on me, i.e., I'm working on this and, when done, I'll include Uma's patches in my series, adapting this bit (she agreed already to this plan). Regards, Dario --=-eIY9Mjn++qr01ab4TgyJ 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 iEYEABECAAYFAlUBwDsACgkQk4XaBE3IOsRCTQCfUNknwht1Io6br+VRiVH2kscc 2jUAn0vnXWLKQCxZDV3ePxxz0HrE9eED =b6dT -----END PGP SIGNATURE----- --=-eIY9Mjn++qr01ab4TgyJ-- --===============3192301328914186759== 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 --===============3192301328914186759==--