From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Andi Kleen <andi@firstfloor.org>,
x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
jesse.brandeburg@intel.com
Subject: Re: [PATCH] Prevent nested interrupts when the IRQ stack is near overflowing v2
Date: Thu, 25 Mar 2010 17:33:59 +0100 [thread overview]
Message-ID: <20100325163359.GA6909@elte.hu> (raw)
In-Reply-To: <20100325162737.GA5276@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
>
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> [...]
> >
> > Now, it's also true that our IRQ infrastructure handlers _could_ be smarter,
> > and make the whole problem less likely to happen.
> >
> > In particular, it's probably true that especially on modern hardware with
> > multiple cores, and especially when you do _not_ have irq sharing (which is
> > the common case these days for things like network drivers that can use
> > MSI), we really would be better off having the irq disabled over the whole
> > thing, and on some interrupt controllers it might even be worth it to do the
> > old optimization of not masking-and-acking, but just acking.
>
> Yes.
>
> > But see above. This is _not_ something that a driver can do any more. They
> > don't know whether the interrupt might end up being shared. Just blindly
> > setting IRAF_DISABLED in a driver is _not_ the answer. But being smarter in
> > the generic irq handler code might work.
> >
> > And then, what we could do, is to mark the drivers that absolutely _must_
> > be able to nest specially. Like the IDE driver when in PIO mode. Or maybe
> > the SCSI drivers, if they still depend on that timer interrupt happening
> > while they are busy.
>
> I think the patch as posted solves a real problem, but also perpetuates a
> bad situation.
>
> At minimum we should print a (one-time) warning that some badness occured.
> That would push us either in the direction of improving drivers, or towards
> improving the generic code.
Furthermore, applying that patch as-is would not just cause us to do nothing
about it in the future, it would also add a rather fragile looking piece of
logic. I.e. it's a sweep-under-the-rug thing pretty much IMO.
So i think Thomas is quite right wrt. ugliness of the patch but missed the
other important fact that this can occur in a lot of places with high enough
IRQ parallelism and cannot be fixed one by one.
Thanks,
Ingo
next prev parent reply other threads:[~2010-03-25 16:34 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 19:02 [PATCH] Prevent nested interrupts when the IRQ stack is near overflowing v2 Andi Kleen
2010-03-24 20:42 ` Thomas Gleixner
2010-03-24 23:08 ` Thomas Gleixner
2010-03-25 0:36 ` Andi Kleen
2010-03-25 1:46 ` Thomas Gleixner
2010-03-25 9:37 ` Andi Kleen
2010-03-25 11:09 ` Thomas Gleixner
2010-03-25 12:11 ` Andi Kleen
2010-03-25 13:17 ` Thomas Gleixner
2010-03-25 13:32 ` Andi Kleen
2010-03-25 14:16 ` Thomas Gleixner
2010-03-25 15:38 ` Andi Kleen
2010-03-25 16:06 ` Alan Cox
2010-03-25 16:13 ` Linus Torvalds
2010-03-25 16:17 ` Linus Torvalds
2010-03-25 16:27 ` Ingo Molnar
2010-03-25 16:33 ` Ingo Molnar [this message]
2010-03-25 18:27 ` Andi Kleen
2010-03-26 4:55 ` Eric W. Biederman
2010-03-25 16:52 ` Thomas Gleixner
2010-03-25 17:47 ` Peter Zijlstra
2010-03-25 18:01 ` Linus Torvalds
2010-03-25 18:21 ` Peter Zijlstra
2010-03-25 18:23 ` Peter Zijlstra
2010-03-25 18:44 ` Andi Kleen
2010-03-25 19:01 ` Ingo Molnar
2010-03-25 18:29 ` Ingo Molnar
2010-03-25 19:10 ` Linus Torvalds
2010-03-25 19:42 ` David Miller
2010-03-25 20:40 ` Linus Torvalds
2010-03-26 3:33 ` David Miller
2010-03-25 20:51 ` Ingo Molnar
2010-03-25 20:53 ` Linus Torvalds
2010-03-26 6:10 ` Andi Kleen
2010-03-25 10:50 ` Alan Cox
2010-03-25 11:16 ` Thomas Gleixner
2010-03-25 11:59 ` Alan Cox
2010-03-25 12:00 ` Andi Kleen
2010-03-25 11:57 ` Andi Kleen
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=20100325163359.GA6909@elte.hu \
--to=mingo@elte.hu \
--cc=andi@firstfloor.org \
--cc=jesse.brandeburg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.