From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 2/7] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS Date: Thu, 8 Oct 2015 22:12:43 +0200 Message-ID: <1444335163.11582.13.camel@citrix.com> References: <20151008124027.12522.42552.stgit@Solace.station> <20151008125243.12522.8999.stgit@Solace.station> <561688D9.30509@citrix.com> <1444319374.22254.42.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2503503140201156979==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZkHZ6-0000ID-B2 for xen-devel@lists.xenproject.org; Thu, 08 Oct 2015 20:13:24 +0000 In-Reply-To: <1444319374.22254.42.camel@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 , Meng Xu , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============2503503140201156979== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-AsM9XkzcxmtE9gpB6MVy" --=-AsM9XkzcxmtE9gpB6MVy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2015-10-08 at 17:49 +0200, Dario Faggioli wrote: > On Thu, 2015-10-08 at 16:16 +0100, George Dunlap wrote: > > It seems to me that the locking here wasn't to protect insert_vcpu, > > but > > to prevent any scheduling events from happening on cpu until all > > the > > expected infrastructure (ticks, idle vcpu, &c) were ready. I can't > > immediately convince myself that removing these is safe in that > > regard. > > Can you address this? > >=20 > Scheduling can't happen on the cpu, until later than the end of this > function, when, in cpupool_assign_cpu_locked(), we set to 1 its > corresponding bit in the target cpupool's cpu_valid mask. > We've been discussing, basically about the same issue, with Jan in > here: > https://www.choon.net/forum/read.php?22,3817262,3817489 >=20 > And I'll add the promised ASSERT() and comment, when sending v2 of > that > patch. :-) >=20 Or, of course, I can put them down when doing v2 of _this_ patch, if that makes it easier to understand why what I'm doing here is safe. Yes, I think I'll do it here, I like it better that way. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-AsM9XkzcxmtE9gpB6MVy 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 iEYEABECAAYFAlYWzjsACgkQk4XaBE3IOsT1GwCfQzxz/o/svguxFOnpWvLQ+eQ0 yiQAoJeqqTTlx7mIsSPwPT/gFCGtC7vK =xi4z -----END PGP SIGNATURE----- --=-AsM9XkzcxmtE9gpB6MVy-- --===============2503503140201156979== 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 --===============2503503140201156979==--