From: Peter Zijlstra <peterz@infradead.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] irq: remove IRQF_DISABLED
Date: Fri, 06 Mar 2009 10:12:13 +0100 [thread overview]
Message-ID: <1236330733.6326.15.camel@laptop> (raw)
In-Reply-To: <1236329922.7260.127.camel@pasglop>
On Fri, 2009-03-06 at 19:58 +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2009-03-02 at 09:11 -0800, Linus Torvalds wrote:
> >
> > On Mon, 2 Mar 2009, Peter Zijlstra wrote:
> > >
> > > Would you be willing to take such a patch?
> >
> > Yes - some day.
> >
> > The "irq's disabled fastpath" thing has been there since pretty much day
> > one, because some irq handlers always wanted it. Making it the default
> > (and the only choice) is fine.
>
> .../...
>
> I tend to disagree... (not -that- strongly but I felt like saying it
> anyway :-) some archs have a reasonably nice support in the PIC for
> interrupt priorities, allowing higher priority interrupts to "preempt"
> lower priority ones, which this would effectively render useless.
>
> Also, while yes, I agree, interrupts handlers -should- be short in
> practice IDE is far from being the only example where this is not the
> case and so we would delay timer interrupts for example for a
> significant amount of time (or serial, that's another good example).
>
> Also, we use the priority on some platform to have a high priority used
> as a kind of "debugger" NMI .. ie, we don't have a real NMI but it's
> better than nothing and here too, this would break it.
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?
> I don't see us having such a strong benefit from this... in fact, with
> things like -rt, interrupts get moved to threads no ? Thus they
> typically run with interrupts enabled... why have a different behaviour
> on non-rt ? or I am missing something ? (I'm not terribly familiar with
> the -rt stuff here so I probably am missing something).
Threaded interrupts are quite a different beast. To make best use of
them device drivers will have to be re-written. Hence the opt-in
approach.
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.
The latter just isn't true, as you still have preemption disabled, so
everything but irqs still suffers.
The only way to make things low-latency is to pull work out of
non-preemptable context. Using threaded IRQs is one way to do that.
next prev parent reply other threads:[~2009-03-06 9:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 12:21 [RFC][PATCH] irq: remove IRQF_DISABLED Peter Zijlstra
2009-03-02 14:43 ` Ingo Molnar
2009-03-02 15:47 ` Matthew Wilcox
2009-03-02 15:59 ` Peter Zijlstra
2009-03-02 16:32 ` Matthew Wilcox
2009-03-02 21:01 ` Russell King
2009-03-02 21:17 ` Ingo Molnar
2009-03-02 21:17 ` Ingo Molnar
2009-03-02 17:11 ` Linus Torvalds
2009-03-02 17:55 ` Bartlomiej Zolnierkiewicz
2009-03-02 18:02 ` Peter Zijlstra
2009-03-02 18:07 ` Peter Zijlstra
2009-03-02 18:27 ` Bartlomiej Zolnierkiewicz
2009-03-02 18:29 ` Linus Torvalds
2009-03-02 18:48 ` Bartlomiej Zolnierkiewicz
2009-03-02 19:06 ` Linus Torvalds
2009-03-02 19:18 ` Bartlomiej Zolnierkiewicz
2009-03-02 17:56 ` Peter Zijlstra
2009-03-02 18:45 ` Vadim Lobanov
2009-03-02 18:45 ` Vadim Lobanov
2009-03-02 18:54 ` Linus Torvalds
2009-03-05 15:40 ` Mark Lord
2009-03-02 21:17 ` Alan Cox
2009-03-02 21:17 ` Alan Cox
2009-03-06 8:58 ` Benjamin Herrenschmidt
2009-03-06 9:12 ` Peter Zijlstra [this message]
2009-03-06 9:59 ` Benjamin Herrenschmidt
2009-03-06 10:05 ` Benjamin Herrenschmidt
2009-03-06 10:24 ` Peter Zijlstra
2009-03-06 17:02 ` Peter Zijlstra
2009-03-06 21:40 ` Benjamin Herrenschmidt
2009-03-02 17:55 ` Andrew Morton
2009-03-02 18:10 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1236330733.6326.15.camel@laptop \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox