Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753317Ab1EEItH (ORCPT ); Thu, 5 May 2011 04:49:07 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:28593 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338Ab1EEItF (ORCPT ); Thu, 5 May 2011 04:49:05 -0400 X-IronPort-AV: E=Sophos;i="4.64,318,1301875200"; d="scan'208";a="5609753" Subject: Re: [PATCH] x86: skip migrating percpu irq in fixup_irqs From: Ian Campbell To: "Tian, Kevin" CC: "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "JBeulich@novell.com" In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C8ED7F327@shsmsx502.ccr.corp.intel.com> References: <625BA99ED14B2D499DC4E29D8138F1505C8ED7F327@shsmsx502.ccr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Organization: Citrix Systems, Inc. Date: Thu, 5 May 2011 09:49:03 +0100 Message-ID: <1304585343.26692.71.camel@zakaz.uk.xensource.com> MIME-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2371 Lines: 53 On Thu, 2011-05-05 at 09:15 +0100, Tian, Kevin wrote: > x86: skip migrating percpu irq in fixup_irqs > > IRQF_PER_CPU is used by Xen for a set of virtual interrupts binding to > a specific vcpu, but it's not recognized in fixup_irqs which simply > atempts to migrate it to other vcpus. In most cases this just works, > because Xen event channel chip silently fails the set_affinity ops for > irqs marked as IRQF_PER_CPU. But there's a special category (like used > for pv spinlock) also adds a IRQ_DISABLED flag, used as polled only event > channels which don't expect any instance injected. However fixup_irqs > absolutely masks/unmasks irqs which makes such special type irq injected > unexpectely while there's no handler for it. > > This error is triggered on some box when doing reboot. The fix is to > recognize IRQF_PER_CPU flag early before the affinity change, which > actually matches the rationale of IRQF_PER_CPU. Skipping affinity fixup for PER_CPU IRQs seems logical enough (so I suspect this patch is good in its own right) but if the real issue you are fixing is that IRQ_DISABLED IQRs are getting unmasked should that issue be addressed directly rather than relying on it being a side-effect of PER_CPU-ness? Ian. > Signed-off-by: Fengzhe Zhang > Signed-off-by: Kevin Tian > CC: Thomas Gleixner > CC: Ingo Molnar > CC: H. Peter Anvin > CC: Ian Campbell > CC: Jan Beulich > > diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c > index 1cb0b9f..544efe2 100644 > --- a/arch/x86/kernel/irq.c > +++ b/arch/x86/kernel/irq.c > @@ -249,7 +249,7 @@ void fixup_irqs(void) > > data = irq_desc_get_irq_data(desc); > affinity = data->affinity; > - if (!irq_has_action(irq) || > + if (!irq_has_action(irq) || irqd_is_per_cpu(data) || > cpumask_subset(affinity, cpu_online_mask)) { > raw_spin_unlock(&desc->lock); > continue; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/