From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 1/6] xen: sched: fix locking of remove_vcpu() in credit1 Date: Tue, 3 Nov 2015 18:15:15 +0100 Message-ID: <1446570915.3829.68.camel@citrix.com> References: <20151029225158.25219.4625.stgit@Solace.station> <20151029230413.25219.20869.stgit@Solace.station> <5637A5AF.4020205@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4863268785829290068==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZtfB9-0007aT-0u for xen-devel@lists.xenproject.org; Tue, 03 Nov 2015 17:15:27 +0000 In-Reply-To: <5637A5AF.4020205@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 , xen-devel@lists.xenproject.org Cc: George Dunlap , Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============4863268785829290068== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-6F+iFBb9FbXXQ3odXBwd" --=-6F+iFBb9FbXXQ3odXBwd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2015-11-02 at 18:04 +0000, George Dunlap wrote: > On 29/10/15 23:04, Dario Faggioli wrote: > > @@ -936,15 +936,19 @@ csched_vcpu_remove(const struct scheduler > > *ops, struct vcpu *vc) > > vcpu_unpause(svc->vcpu); > > } > > =20 > > + lock =3D vcpu_schedule_lock_irq(vc); > > + > > if ( __vcpu_on_runq(svc) ) > > __runq_remove(svc); > > =20 > > - spin_lock_irqsave(&(prv->lock), flags); > > + vcpu_schedule_unlock_irq(lock, vc); >=20 > Actually, at this point the domain should be either paused or in the > middle of being destroyed, so it shouldn't be possible for the vcpu > to > be on the runqueue, should it? > Makes sense. > Should we instead change that if() to an > ASSERT(!__vcpu_on_runqueue(svc))? >=20 I like the idea, I'll do it like this. 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) --=-6F+iFBb9FbXXQ3odXBwd 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 iEYEABECAAYFAlY466MACgkQk4XaBE3IOsRO7gCfWha4uPlHu9hjpIph04lEGXHv 0IQAn3b4lxwWn/PlsnIKbrUH3wBmXsXF =m71+ -----END PGP SIGNATURE----- --=-6F+iFBb9FbXXQ3odXBwd-- --===============4863268785829290068== 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 --===============4863268785829290068==--