From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 2/2] xen: credit1: avoid boosting vCPUs being "just" migrated Date: Fri, 12 Feb 2016 11:50:39 +0100 Message-ID: <1455274239.3148.342.camel@citrix.com> References: <20160212093501.16002.32635.stgit@Solace.station> <20160212093705.16002.46867.stgit@Solace.station> <56BDB91102000078000D153D@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6875028234295240874==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aUBJE-0007Tl-Ux for xen-devel@lists.xenproject.org; Fri, 12 Feb 2016 10:50:45 +0000 In-Reply-To: <56BDB91102000078000D153D@prv-mh.provo.novell.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: Jan Beulich Cc: George Dunlap , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org --===============6875028234295240874== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-4B6ZXhAV+OUp1YCkt96V" --=-4B6ZXhAV+OUp1YCkt96V Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2016-02-12 at 02:50 -0700, Jan Beulich wrote: > > > > On 12.02.16 at 10:37, wrote: > > @@ -787,6 +788,16 @@ _csched_cpu_pick(const struct scheduler *ops, > > struct vcpu *vc, bool_t commit) > > =C2=A0static int > > =C2=A0csched_cpu_pick(const struct scheduler *ops, struct vcpu *vc) > > =C2=A0{ > > +=C2=A0=C2=A0=C2=A0=C2=A0struct csched_vcpu *svc =3D CSCHED_VCPU(vc); > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0/* > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* We have been called by vcpu_migrate() = (in schedule.c), as > > part > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* of the process of seeing if vc can be = migrated to another > > pcpu. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* We make a note about this in svc->flag= s so that later, in > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* csched_vcpu_wake() (still called from = vcpu_migrate()) we > > won't > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* get boosted, which we don't deserve as= we are "only" > > migrating. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*/ > > +=C2=A0=C2=A0=C2=A0=C2=A0set_bit(CSCHED_FLAG_VCPU_MIGRATING, &svc->flag= s); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return _csched_cpu_pick(ops, vc, 1); > > =C2=A0} >=20 > I think you either want __set_bit() here or ... >=20 Yes, this is completely serialized by the vcpu's scheduler lock, so I indeed want __set_bit(), sorry for the overlook. 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) --=-4B6ZXhAV+OUp1YCkt96V 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 iEYEABECAAYFAla9uP8ACgkQk4XaBE3IOsQrkwCfaAJ+nmOPKBT89VaTfUD3QJcs PFoAoKpsGAn1tischAaCTFzrn/hFcPTI =rqDD -----END PGP SIGNATURE----- --=-4B6ZXhAV+OUp1YCkt96V-- --===============6875028234295240874== 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 --===============6875028234295240874==--