From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Liuqiming (John)" Subject: Re: [PATCH] Remove a set operation for VCPU_KICK_SOFTIRQ when post interrupt to vm. Date: Mon, 7 Sep 2015 22:24:00 +0800 Message-ID: <55ED9E00.2010105@huawei.com> References: <1441637175-18070-1-git-send-email-john.liuqiming@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZYxLx-0002vZ-C3 for xen-devel@lists.xenproject.org; Mon, 07 Sep 2015 14:25:01 +0000 In-Reply-To: <1441637175-18070-1-git-send-email-john.liuqiming@huawei.com> 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: yang.z.zhang@Intel.com, zw.zhang@huawei.com, hanweidong@huawei.com List-Id: xen-devel@lists.xenproject.org I believe this also has something to do with a windows guest boot hang issue. It randomly occured, when boot a guest has windows 2008 os and pv-driver installed. The boot process hangs when wait xenstored replay event signal. It can be reproduced after hundreds reboot using the xen staging branch. But after I changed this code the hang issue can not reproduce. Any Ideas? On 2015/9/7 22:46, - wrote: > From: liuqiming 00178499 > > This set operation doesn't make any sense, and it will block later > interrupt injected into vm (by vcpu_kick or deliver_posted_intr), > which will cause a performance issue on CPU supporting posted-interrupt. > > Signed-off-by: Qiming Liu > Cc: Yang Zhang > --- > xen/arch/x86/hvm/vmx/vmx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c > index 2582cdd..9480b44 100644 > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -1681,7 +1681,7 @@ static void __vmx_deliver_posted_interrupt(struct vcpu *v) > { > unsigned int cpu = v->processor; > > - if ( !test_and_set_bit(VCPU_KICK_SOFTIRQ, &softirq_pending(cpu)) > + if ( !test_bit(VCPU_KICK_SOFTIRQ, &softirq_pending(cpu)) > && (cpu != smp_processor_id()) ) > send_IPI_mask(cpumask_of(cpu), posted_intr_vector); > }