From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 03 of 10 v2] xen: sched_credit: let the scheduler know about node-affinity Date: Thu, 20 Dec 2012 09:16:10 +0100 Message-ID: <1355991370.28419.15.camel@Abyss> References: <06d2f322a6319d8ba212.1355944039@Solace> <50D2B3DE.70206@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5146542251294028542==" Return-path: In-Reply-To: <50D2B3DE.70206@ts.fujitsu.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: Juergen Gross Cc: Marcus Granado , Dan Magenheimer , Ian Campbell , Anil Madhavapeddy , George Dunlap , Andrew Cooper , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich , Daniel De Graaf , Matt Wilson List-Id: xen-devel@lists.xenproject.org --===============5146542251294028542== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-2+MsGxpSMVOkyiBZmytI" --=-2+MsGxpSMVOkyiBZmytI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2012-12-20 at 07:44 +0100, Juergen Gross wrote:=20 > Am 19.12.2012 20:07, schrieb Dario Faggioli: > > [...]=20 > > > > This change modifies the VCPU load balancing algorithm (for the > > credit scheduler only), introducing a two steps logic. > > During the first step, we use the node-affinity mask. The aim is > > giving precedence to the CPUs where it is known to be preferable > > for the domain to run. If that fails in finding a valid PCPU, the > > node-affinity is just ignored and, in the second step, we fall > > back to using cpu-affinity only. > > > > Signed-off-by: Dario Faggioli > > --- > > Changes from v1: > > * CPU masks variables moved off from the stack, as requested during > > review. As per the comments in the code, having them in the private > > (per-scheduler instance) struct could have been enough, but it woul= d be > > racy (again, see comments). For that reason, use a global bunch of > > them of (via per_cpu()); >=20 > Wouldn't it be better to put the mask in the scheduler private per-pcpu a= rea? > This could be applied to several other instances of cpu masks on the stac= k, > too. >=20 Yes, as I tired to explain, if it's per-cpu it should be fine, since credit has one runq per each CPU and hence runq lock is enough for serialization. BTW, can you be a little bit more specific about where you're suggesting to put it? I'm sorry but I'm not sure I figured what you mean by "the scheduler private per-pcpu area"... Do you perhaps mean making it a member of `struct csched_pcpu' ? Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-2+MsGxpSMVOkyiBZmytI 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.4.12 (GNU/Linux) iEYEABECAAYFAlDSyUoACgkQk4XaBE3IOsQ0ygCbBezWUrauMh3gF7zGj48dw3uG HxQAoJ4JW9w9Y6S8+Njy9uuJX0l8akET =q+7/ -----END PGP SIGNATURE----- --=-2+MsGxpSMVOkyiBZmytI-- --===============5146542251294028542== 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 --===============5146542251294028542==--