From: Dario Faggioli Subject: [PATCH v2 0/6] xen: sched: fix locking of {insert, remove}_vcpu() Date: Wed, 14 Oct 2015 17:53:53 +0200 Message-ID: <20151014151805.28642.63981.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZmONL-0005IW-7M for xen-devel@lists.xenproject.org; Wed, 14 Oct 2015 15:53:59 +0000 Received: by wijp11 with SMTP id p11so61675wij.0 for ; Wed, 14 Oct 2015 08:53:56 -0700 (PDT) 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 , Juergen Gross , Meng Xu , Jan Beulich , Andrew Cooper List-Id: xen-devel@lists.xenproject.org Hey, Here it comes v2 of this series. It took a bit more than how I wanted, mostly because of the cpufreq issue I found while testing (as I though I was causing it! :-/). Version 1 is here: http://www.gossamer-threads.com/lists/xen/devel/401619?page=last I think I've addressed all the review comments, but the series also changed a little bit. Because of that, most of the patches don't carry the Reviewed-/Acked-by tags they were given during v1's review. More specifically: * patch 2 needed adjustments as, in case only patches 1 and 2 are applied (i.e., if what was patch 3 in v1, which is now patch 4, is _not_applied) the runqueue lock in Credit1's implementation of insert_vcpu() needs to be an _irqsave() one. In fact, it is acquired with interrupt disabled during boot (when initializing idle vCPUs). Since Credit2 and RTDS bail out before even trying taking the lock, for idle vCPUs, they're fine with just _irq(). Also, it can be turned into an _irq() one in patch 4, when we kill the need of calling that hook altogether, for idle vCPUs. This is done like this because I think it is worth considering backporting patches 1 and 2, so I think it's important that they work well, independently from the rest of the series (which is mostly improvements, so backporting is out of question) * patch 3 is new. It's "just" comments and ASSERT()-s about something discussed already with both Jan and George. The rest, really should be no more than v1 with review comments addressed (except, of course, patches 6 and 7 from v1, which are in already :-D). Git branch available here: git://xenbits.xen.org/people/dariof/xen.git rel/sched/fix-vcpu-ins-rem-v2 Thanks and Regards, Dario --- Dario Faggioli (6): xen: sched: fix locking of remove_vcpu() in credit1 xen: sched: fix locking for insert_vcpu() in credit1 and RTDS xen: sched: clarify use cases of schedule_cpu_switch() xen: sched: better handle (not) inserting idle vCPUs in runqueues xen: sched: get rid of the per domain vCPU list in RTDS xen: sched: get rid of the per domain vCPU list in Credit2 xen/common/sched_credit.c | 17 ++++++++++-- xen/common/sched_credit2.c | 55 ++++++++++++++-------------------------- xen/common/sched_rt.c | 61 ++++++++++++++++++++++---------------------- xen/common/schedule.c | 55 ++++++++++++++++++++++++++++------------ 4 files changed, 102 insertions(+), 86 deletions(-) -- <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)