Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756515AbZCFRDL (ORCPT ); Fri, 6 Mar 2009 12:03:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756406AbZCFRCo (ORCPT ); Fri, 6 Mar 2009 12:02:44 -0500 Received: from casper.infradead.org ([85.118.1.10]:59461 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756472AbZCFRCm (ORCPT ); Fri, 6 Mar 2009 12:02:42 -0500 Subject: Re: [RFC][PATCH] irq: remove IRQF_DISABLED From: Peter Zijlstra To: Benjamin Herrenschmidt Cc: Linus Torvalds , Ingo Molnar , Thomas Gleixner , lkml , linux-arch , Andrew Morton In-Reply-To: <1236335049.6326.114.camel@laptop> References: <1235996477.5330.174.camel@laptop> <1236329922.7260.127.camel@pasglop> <1236330733.6326.15.camel@laptop> <1236333543.7260.138.camel@pasglop> <1236335049.6326.114.camel@laptop> Content-Type: text/plain Date: Fri, 06 Mar 2009 18:02:24 +0100 Message-Id: <1236358944.6326.538.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.25.92 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1549 Lines: 37 On Fri, 2009-03-06 at 11:24 +0100, Peter Zijlstra wrote: > On Fri, 2009-03-06 at 20:59 +1100, Benjamin Herrenschmidt wrote: > > > If you have distinct interrupt priorities, you can > > > > > > 1) provide an interrupt stack for each priority > > > 2) mask all lower priorities when handling one > > > > > > Would that not work? > > > > The PIC does that already. IE. it will only interrupt again before > > ->eoi() for an interrupt of a higher priority. But by using > > IRQF_DISABLED, you mask interrupts in the core, and thus effectively > > completely prevents the whole thing. > > > > > The problems with enabling irqs in hardirq handlers are that you get > > > unlimited irq nesting, which is bad for your stack, furthermore, somehow > > > people thing it makes things 'faster' because the irq-off latency goes > > > down. > > > > No, you don't get unlimited IRQ nesting, at least not on sane archs with > > a decent PIC that does things like what I described above :-) > > Right, welcome to x86 ;-) Ok, people put me straight here. Since linux not support interrupt priorities, wouldn't it simply be a matter of implementing local_irq_en/dis-able() as masking the lowest level you use to run normal interrupts on? That will leave your other interrupt level available as NMI/debug thingies. -- 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/