From: Keir Fraser Subject: Re: [Patch] continue_hypercall_on_cpu rework using tasklets Date: Thu, 15 Apr 2010 12:22:47 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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: "Jiang, Yunhong" Cc: "xen-devel@lists.xensource.com" , "Yu, Ke" List-Id: xen-devel@lists.xenproject.org On 15/04/2010 12:06, "Keir Fraser" wrote: >> Hmm, I have cc'ed one of the PM guys because it is enter_state :-) >> Can we add check in vcpu_sleep_sync() for current? It is meaningless to >> cpu_relax for current vcpu in that situation, especially if we are not in irq >> context. >> I'm not sure why in freeze_domains it only checkes dom0's vcpu for current, >> instead of all domains. > > Well actually pausing any vcpu from within the hypercall continuation is > dangerous. The softirq handler running the hypercall continuation may have > interrupted some running VCPU X. And the VCPU Y that the continuation is > currently trying to pause may itself be trying to pause X. So we can get a > deadlock that way. The freeze_domains() *has* to be pulled outside of the > hypercall continuation. Changesets 21180 and 21181 in xen-unstable are my attempts to fix this. Yu Ke, please let me know if these look and test okay for you guys. Thanks, Keir