From: Keir Fraser Subject: Re: CPU offlining patch xen-unstable:21049 Date: Thu, 15 Apr 2010 11:17:13 +0100 Message-ID: References: <789F9655DD1B8F43B48D77C5D30659731D73CE58@shsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <789F9655DD1B8F43B48D77C5D30659731D73CE58@shsmsx501.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jiang, Yunhong" Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 15/04/2010 09:50, "Jiang, Yunhong" wrote: > I think the try_lock is not for the cpu_down(). The point is, if another CPU > is trying the get the lock. > > Considering following scnerio: > 1) cpu_down() in CPU A, and get the xenpf_lock, then call to > stop_machine_run(), trying to bring all CPU to stop_machine_run context. > 2) At the same time, another vcpu in CPU B do a xenpf hypercall, and try to > get the xenpf_lock. If ther is no retyr for this lock, it can't get > xenpf_lock, it will never go to the softirq > So the system will hang. > > Hope this make thing clear. But CPU A doesn't hold the xenpf_lock when it calls stop_machine_run(). It dropped it before cpu_down() got invoked, because that gets executed via continue_hypercall_on_cpu(). -- Keir