From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emmanuel Ackaouy Subject: Re: [PATCH] trivial fix for vcpu_set_affinity Date: Thu, 11 Jan 2007 10:49:05 +0100 Message-ID: <1a798491af4edfaf3abb72d214a01d15@xensource.com> References: Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org I don't get it. If you don't at least call vcpu_sleep_nosync() on the current context when it changes affinity, how do you initiate a reschedule event? What's wrong with the code as is? On Jan 11, 2007, at 9:42, Tian, Kevin wrote: > No need to try migration in current context since self migrate > will be handled by next vcpu after context switch. > > Signed-off-by Kevin Tian > > diff -r e66f047bc97e xen/common/schedule.c > --- a/xen/common/schedule.c Tue Jan 09 18:56:44 2007 -0800 > +++ b/xen/common/schedule.c Thu Jan 11 16:31:37 2007 +0800 > @@ -243,7 +243,7 @@ int vcpu_set_affinity(struct vcpu *v, cp > > vcpu_schedule_unlock_irqrestore(v, flags); > > - if ( test_bit(_VCPUF_migrating, &v->vcpu_flags) ) > + if ( (v != current) && test_bit(_VCPUF_migrating, &v->vcpu_flags) > ) > { > vcpu_sleep_nosync(v); > vcpu_migrate(v); > > Thanks, > Kevin > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel