From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] xen: sched_credit: filter node-affinity mask against online cpus Date: Mon, 16 Sep 2013 17:23:22 +0200 Message-ID: <1379345002.6095.150.camel@Solace> References: <20130913160856.25674.4965.stgit@hit-nxdomain.opendns.com> <52370EE9.3040005@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7483055644734768957==" Return-path: In-Reply-To: <52370EE9.3040005@eu.citrix.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: George Dunlap Cc: Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============7483055644734768957== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-V8K4W9WbRK14GFVSRxlT" --=-V8K4W9WbRK14GFVSRxlT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On lun, 2013-09-16 at 15:00 +0100, George Dunlap wrote: > On 13/09/13 17:09, Dario Faggioli wrote: > > > diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c > > index dbe6de6..d76cd88 100644 > > --- a/xen/common/sched_credit.c > > +++ b/xen/common/sched_credit.c > > > @@ -627,10 +638,18 @@ _csched_cpu_pick(const struct scheduler *ops, str= uct vcpu *vc, bool_t commit) > > int balance_step; > > =20 > > online =3D cpupool_scheduler_cpumask(vc->domain->cpupool); > > + cpumask_and(&cpus, vc->cpu_affinity, online); > > + > > for_each_csched_balance_step( balance_step ) > > { > > + /* > > + * We filter the node-affinity mask against > > + * [vc->cpu_affinity && online] here to avoid problems if all > > + * the cpus in in the node-affinity mask are offline (e.g., > > + * because the domain moved to a different cpupool). > > + */ >=20 > It's probably worth mentioning that the reason you do the cpumask_and=20 > here and not in the other place this is called is that cpumask_cycle is= =20 > called after this one (which will choke on an empy mask), but not in the= =20 > other place it's called. >=20 Well, it is indeed what the comment says, or at leas what I wanted it to say. :-) I tied to concentrate on the actual issue, which is avoid picking an offline cpu, independently on which specific ASSERT is the one that triggers. Anyway, I can try to make the comment more accurate and descriptive though. > Other than that, looks good -- thanks. >=20 Ok, I'll resend with an updated comment. 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) --=-V8K4W9WbRK14GFVSRxlT 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.14 (GNU/Linux) iEYEABECAAYFAlI3ImoACgkQk4XaBE3IOsTiQgCcCixraHEsgTaTxMFr4VLUPVMP smcAoK9DPLZJ0V+55Bp2b1hMT3gqGILb =kUNN -----END PGP SIGNATURE----- --=-V8K4W9WbRK14GFVSRxlT-- --===============7483055644734768957== 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 --===============7483055644734768957==--