From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] credit: generalize __vcpu_has_soft_affinity() Date: Wed, 4 Mar 2015 12:08:28 +0000 Message-ID: <1425470906.2614.41.camel@citrix.com> References: <54F6DB6602000078000660F3@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1906399021290471291==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YT86I-0007QQ-Dj for xen-devel@lists.xenproject.org; Wed, 04 Mar 2015 12:08:30 +0000 In-Reply-To: <54F6DB6602000078000660F3@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.xenproject.org" , George Dunlap List-Id: xen-devel@lists.xenproject.org --===============1906399021290471291== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Pbb5Atr2HOC2xjWgVq6M" --=-Pbb5Atr2HOC2xjWgVq6M Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-03-04 at 09:16 +0000, Jan Beulich wrote: > --- a/xen/common/sched_credit.c > +++ b/xen/common/sched_credit.c > @@ -292,11 +292,9 @@ __runq_remove(struct csched_vcpu *svc) > static inline int __vcpu_has_soft_affinity(const struct vcpu *vc, > const cpumask_t *mask) > { > - if ( cpumask_full(vc->cpu_soft_affinity) > - || !cpumask_intersects(vc->cpu_soft_affinity, mask) ) > - return 0; > - > - return 1; > + return !cpumask_subset(&cpu_online_map, vc->cpu_soft_affinity) && > This can use VCPU2ONLINE(vc). Or do you think the impact of one more if (the ?: in cpupool_online_cpumask) would be too much? > + !cpumask_subset(vc->cpu_soft_affinity, vc->cpu_hard_affinity)= && > + cpumask_intersects(vc->cpu_soft_affinity, mask); > } > =20 Regards, Dario --=-Pbb5Atr2HOC2xjWgVq6M 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 iEYEABECAAYFAlT29boACgkQk4XaBE3IOsQp2QCePOe4ztb2TGQYN5i8rlgkWmZv yDoAn1PS3kgGz36MyHM6/OxZ9cQViz8j =lS8V -----END PGP SIGNATURE----- --=-Pbb5Atr2HOC2xjWgVq6M-- --===============1906399021290471291== 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 --===============1906399021290471291==--