public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/5] genirq: Forced threaded interrupt handlers
@ 2011-02-23 23:52 Thomas Gleixner
  2011-02-23 23:52 ` [patch 1/5] genirq: Prepare the handling of shared oneshot interrupts Thomas Gleixner
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Thomas Gleixner @ 2011-02-23 23:52 UTC (permalink / raw)
  To: LKML; +Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra

Some time ago when the threaded interrupt handlers infrastructure was
about to be merged, Andrew asked me where that command line switch was
which magically runs all interrupt handlers and the softirqs in
threads.

While we were doing that brute force in preempt-rt for quite a while
it took some time to come up with a reasonable non intrusive
implementation for mainline. We also had to find a solution which fits
Linus' recently issued "palatable Trojan horse" requirement (see:
https://lwn.net/Articles/370998/).

The gift of this patch series is the ability to add "threadirqs" to
the kernel command line and magically (almost) all interrupt handlers
- except those which are explicitely marked IRQF_NO_THREAD - are
confined into threads along with all soft interrupts.

That allows to enhance the debugability of the kernel as a bug in an
interrupt handler is not necessarily taking the whole machine
down. It's just the particular irq thread which goes into nirwana. Bad
luck if that's the one which is crucial to retrieve the bug report,
but in most cases - yes, I analysed quite a lot of bugzilla reports -
it will be helpful for reporters not to be forced to transcribe the
bug from the screen.

An architecture has to enable that feature in Kconfig via a selectable
option which says: Yes, we marked all interrupts which never can be
threaded - like IPIs etc. - as IRQF_NO_THREAD. All interrupts marked
IRQF_TIMER or IRQF_PER_CPU are automatically excluded from threading.

A side effect of this is, that the long standing request of supporting
oneshot threaded handlers on shared interrupt lines (given that all
drivers agree) is now possible. I know, that this is nuts, but
unfortunately common sense and basic understanding of the problem
seems to be not required when HW folks are set out to save a gate.

Thanks,

	tglx
---
 Documentation/kernel-parameters.txt |    4 +
 include/linux/interrupt.h           |   13 +++
 include/linux/irqdesc.h             |    2 
 kernel/irq/Kconfig                  |    3 
 kernel/irq/handle.c                 |   34 +++++----
 kernel/irq/internals.h              |    2 
 kernel/irq/manage.c                 |  128 +++++++++++++++++++++++++++++++-----
 kernel/sched.c                      |    5 +
 kernel/softirq.c                    |   16 +++-
 9 files changed, 175 insertions(+), 32 deletions(-)


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-02-26 16:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 23:52 [patch 0/5] genirq: Forced threaded interrupt handlers Thomas Gleixner
2011-02-23 23:52 ` [patch 1/5] genirq: Prepare the handling of shared oneshot interrupts Thomas Gleixner
2011-02-24  2:30   ` Linus Torvalds
2011-02-24 17:56     ` Thomas Gleixner
2011-02-26 16:22   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` [patch 2/5] genirq: Allow " Thomas Gleixner
2011-02-26 16:22   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` [patch 3/5] genirq: Add IRQF_NO_THREAD Thomas Gleixner
2011-02-26 16:22   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` [patch 4/5] sched: Switch wait_task_inactive to schedule_hrtimeout() Thomas Gleixner
2011-02-26 16:23   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-23 23:52 ` [patch 5/5] genirq: Provide forced interrupt threading Thomas Gleixner
2011-02-26 16:23   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-24  7:12 ` [patch 0/5] genirq: Forced threaded interrupt handlers Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox