From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 16/16] xen: sched: implement vcpu hard affinity in Credit2 Date: Tue, 5 Apr 2016 18:50:23 +0200 Message-ID: <1459875023.3166.59.camel@citrix.com> References: <20160318185524.8117.74837.stgit@Solace.station> <20160318190612.8117.79354.stgit@Solace.station> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0874536133666767091==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anUDx-00077m-0J for xen-devel@lists.xenproject.org; Tue, 05 Apr 2016 16:53:05 +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 Cc: xen-devel , Justin Weaver List-Id: xen-devel@lists.xenproject.org --===============0874536133666767091== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-4SjzPVuQVQYn675cx6B1" --=-4SjzPVuQVQYn675cx6B1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2016-03-24 at 15:42 +0000, George Dunlap wrote: > On Fri, Mar 18, 2016 at 7:06 PM, Dario Faggioli > wrote: > >=20 > > From: Justin Weaver > >=C2=A0 > > Signed-off-by: Justin Weaver > > Signed-off-by: Dario Faggioli > Just checking, are the main changes between this patch and the v4 > that > Justin posted: >=20 > 1) Moving the "scratch_mask" to a different patch > 2) The code-cleanups you listed? >=20 Yes, indeed! Sorry for not pointing that out more clearly (e.g., in the cover letter). > One rather tangential question... > > --- a/xen/common/sched_credit2.c > > +++ b/xen/common/sched_credit2.c > > @@ -560,8 +590,9 @@ runq_tickle(const struct scheduler *ops, > > unsigned int cpu, struct csched2_vcpu * > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto tickle; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > >=20 > > -=C2=A0=C2=A0=C2=A0=C2=A0/* Get a mask of idle, but not tickled */ > > +=C2=A0=C2=A0=C2=A0=C2=A0/* Get a mask of idle, but not tickled, that n= ew is allowed to > > run on. */ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cpumask_andnot(&mask, &rqd->idle, &rqd->t= ickled); > > +=C2=A0=C2=A0=C2=A0=C2=A0cpumask_and(&mask, &mask, new->vcpu->cpu_hard_= affinity); > It looks like this uses a cpumask_t on the stack -- can we use > scratch_mask here, or is there some reason we need to use the local > variable? >=20 > But that's really something to either add to the previous patch, or > to > do in yet a different patch. >=20 It's because that cpumask stack variable is there already, and the primary purpose of the scratch mask is to avoid _adding_more_ of them. This is how it has been introduced and used so far in Credit1 and RTDS. That said, I do agree it can well be used to get rid of some of the already existing stack variable, but, as you suggest yourself, I'm thinking about doing this in another patch. > Acked-by: George Dunlap > 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) --=-4SjzPVuQVQYn675cx6B1 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 iEYEABECAAYFAlcD7M8ACgkQk4XaBE3IOsScPgCfRr/D8teeZObPkuAGQFTTmKyH pPgAn0YYt4MokGDZWZOyXoupfPd0C08L =H9Ad -----END PGP SIGNATURE----- --=-4SjzPVuQVQYn675cx6B1-- --===============0874536133666767091== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============0874536133666767091==--