From: "Jan Beulich" Subject: Re: [PATCH v1 02/13] Set VCPU's is_running flag closer to when the VCPU is dispatched Date: Wed, 11 Sep 2013 08:58:07 +0100 Message-ID: <52303EAF02000078000F24A4@nat28.tlf.novell.com> References: <1378826470-4085-1-git-send-email-boris.ostrovsky@oracle.com> <1378826470-4085-3-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VJfJT-0005b9-JR for xen-devel@lists.xenproject.org; Wed, 11 Sep 2013 07:58:11 +0000 In-Reply-To: <1378826470-4085-3-git-send-email-boris.ostrovsky@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: suravee.suthikulpanit@amd.com, George.Dunlap@eu.citrix.com, jacob.shin@amd.com, eddie.dong@intel.com, dietmar.hahn@ts.fujitsu.com, jun.nakajima@intel.com, xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 10.09.13 at 17:20, Boris Ostrovsky wrote: > --- a/xen/common/schedule.c > +++ b/xen/common/schedule.c > @@ -1219,8 +1219,14 @@ static void schedule(void) > * switch, else lost_records resume will not work properly. > */ > > - ASSERT(!next->is_running); > - next->is_running = 1; > +#ifdef CONFIG_X86 > + if ( is_idle_vcpu(next) ) > + /* On x86 guests will set is_running right before they start running. */ > +#endif > + { > + ASSERT(!next->is_running); > + next->is_running = 1; > + } I'm not sure the change as a whole is appropriate in the first place (the patch description is all but assuring that this change doesn't have unexpected side effects, namely in the individual schedulers), but this clearly is a no-go: Either do this consistently for ARM too, or drop the idea. Jan