From: Andi Kleen <andi@firstfloor.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <andi@firstfloor.org>,
x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
jesse.brandeburg@intel.com,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] Prevent nested interrupts when the IRQ stack is near overflowing v2
Date: Thu, 25 Mar 2010 10:37:44 +0100 [thread overview]
Message-ID: <20100325093744.GH20695@one.firstfloor.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1003250201370.3147@localhost.localdomain>
On Thu, Mar 25, 2010 at 02:46:42AM +0100, Thomas Gleixner wrote:
> "misleading" is an euphemism at best ...
>
> This is ever repeating shit: your changelogs suck big time!
As much as your comments I guess.
>
> > "
> > Multiple vectors on a multi port NIC pointing to the same CPU,
> > all hitting the irq stack until it overflows.
> > "
>
> So there are several questions:
>
> 1) Why are those multiple vectors all hitting the same cpu at the same
> time ? How many of them are firing at the same time ?
This was 4 NIC ports being operational under stress at the same time
>
> 2) What kind of scenario is that ? Massive traffic on the card or some
> corner case ?
Massive traffic on the card from multiple ports on a large system.
> 3) Why does the NIC driver code not set IRQF_DISABLED in the first
> place? AFAICT the network drivers just kick off NAPI, so whats the
> point to run those handlers with IRQs enabled at all ?
I think the idea was to minimize irq latency for other interrupts
But yes defaulting to IRQF_DISABLED would fix it too, at some
cost. In principle that could be done also.
>
> > > case of MSI-X it just disables the IRQ when it comes again while the
> > > first irq on that vector is still in progress. So the maximum nesting
> > > is two up to handle_edge_irq() where it disables the IRQ and returns
> > > right away.
> >
> > Real maximum nesting is all IRQs running with interrupts on pointing
> > to the same CPU. Enough from multiple busy IRQ sources and you go boom.
>
> Which leads to the general question why we have that IRQF_DISABLED
> shite at all. AFAICT the historical reason were IDE drivers, but we
My understanding was that traditionally the irq handlers were
allowed to nest and the "fast" non nest case was only added for some
fast handlers like serial with small FIFOs.
> grew other abusers like USB, SCSI and other crap which runs hard irq
> handlers for hundreds of micro seconds in the worst case. All those
> offenders need to be fixed (e.g. by converting to threaded irq
> handlers) so we can run _ALL_ hard irq context handlers with interrupts
> disabled. lockdep will sort out the nasty ones which enable irqs in the
> middle of that hard irq handler.
Ok glad to give you advertisement time for your pet project...
Anyways if such a thing was done it would be a long term project
and that short term fix would be still needed.
> the handlers on which you enforce IRQ_DISABLED does not enable
> interrupts itself ? You _CANNOT_.
I can't, just as much as I cannot enforce they won't crash or not loop
forever or something. But afaik they don't.
I did some quick grepping and didn't found a driver who does that
at least.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2010-03-25 9:37 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 [this message]
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
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=20100325093744.GH20695@one.firstfloor.org \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox