lkml.org 
[lkml]   [2010]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Prevent nested interrupts when the IRQ stack is near overflowing v2

* David Miller <davem@davemloft.net> wrote:

> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Thu, 25 Mar 2010 12:10:22 -0700 (PDT)
>
> > On Thu, 25 Mar 2010, Ingo Molnar wrote:
> >>
> >> So the patch below should at most trigger bugs in areas that need fixing
> >> anyway, and i'm quite sure that under no circumstance would it cause
> >> unforeseen problems in 'thousands of drivers'.
> >
> > If we do this, then we should just remove all the IRQF_DISABLED code in
> > kernel/irq/manage.c too, and basically make IRQF_DISABLED a clear no-op
> > (still leave it around as a #define, to not break any users).
>
> FWIW, I'm currently using IRQF_DISABLED for virtual network device
> interrupts on sparc64 as a workaround for some stack overflow issues.

I think IRQF_DISABLED is the sanest method to run IRQs: it's the most atomic,
thus most cache-efficient, it doesnt nest, and it's also a tiny bit faster to
execute, by a few instructions (on x86).

> This change will just force me to work harder to find out a better way to
> fix the problem, so don't let my issue hold this back, it's just an FYI...

The patch i sent basically hardcodes IRQF_DISABLED - so it should fix your
problem automatically. IRQF_DISABLED will become an unconditional thing, and
we can then also remove it.

Ingo


\
 
 \ /
  Last update: 2010-03-25 21:53    [W:0.429 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site