From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 2/6] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS Date: Fri, 16 Oct 2015 18:25:22 +0200 Message-ID: <1445012722.3009.89.camel@citrix.com> References: <20151014151805.28642.63981.stgit@Solace.station> <20151014155409.28642.67629.stgit@Solace.station> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8733009598270934304==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zn7p2-0007ht-0t for xen-devel@lists.xenproject.org; Fri, 16 Oct 2015 16:25:36 +0000 In-Reply-To: <20151014155409.28642.67629.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: George Dunlap , Andrew Cooper , Meng Xu , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============8733009598270934304== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-wsKHAV9KqxZz6VDJMaPN" --=-wsKHAV9KqxZz6VDJMaPN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-10-14 at 17:54 +0200, Dario Faggioli wrote: So, about this: > Note that it is safe to get rid of the locking in > schedule_cpu_switch() as the pCPU being switched is, at > the time of the switch, not a valid member of any cpupool, > so no scheduling event should be expected on it, locking > or not. >=20 I changed my mind about removing this locking. In fact... =20 > @@ -1509,8 +1507,6 @@ int schedule_cpu_switch(unsigned int cpu, > struct cpupool *c) > return -ENOMEM; > } > =20 > - lock =3D pcpu_schedule_lock_irqsave(cpu, &flags); > - > SCHED_OP(old_ops, tick_suspend, cpu); > vpriv_old =3D idle->sched_priv; > idle->sched_priv =3D vpriv; > @@ -1520,8 +1516,6 @@ int schedule_cpu_switch(unsigned int cpu, > struct cpupool *c) > SCHED_OP(new_ops, tick_resume, cpu); > SCHED_OP(new_ops, insert_vcpu, idle); > =20 > - pcpu_schedule_unlock_irqrestore(lock, flags, cpu); > - > SCHED_OP(old_ops, free_vdata, vpriv_old); > SCHED_OP(old_ops, free_pdata, ppriv_old, cpu); > =20 ... while reworking and testing my other series (the one about Credit2 runqueues) I'm seeing some issues (even without the patches from that series applied) that may be related to this lock not being taken any longer. Also (less strong an argument, but still), when splitting allocation and in= itialization of per-pCPU data (which is what that series does) I'd probably= have to reinstate some similar locking again. :-/ I'll investigate more and respin this series. 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) --=-wsKHAV9KqxZz6VDJMaPN 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 iEYEABECAAYFAlYhJPIACgkQk4XaBE3IOsQTyACeJzz7Md/bcHQ3gf+xX870SSr1 CCcAnA2b56wDWMs0SQzLsyK7LLtUQUjn =5aMq -----END PGP SIGNATURE----- --=-wsKHAV9KqxZz6VDJMaPN-- --===============8733009598270934304== 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 --===============8733009598270934304==--