1. 26 Feb, 2011 1 commit
    • Thomas Gleixner's avatar
      genirq: Provide forced interrupt threading · 8d32a307
      Thomas Gleixner authored
      Add a commandline parameter "threadirqs" which forces all interrupts except
      those marked IRQF_NO_THREAD to run threaded. That's mostly a debug option to
      allow retrieving better debug data from crashing interrupt handlers. If
      "threadirqs" is not enabled on the kernel command line, then there is no
      impact in the interrupt hotpath.
      
      Architecture code needs to select CONFIG_IRQ_FORCED_THREADING after
      marking the interrupts which cant be threaded IRQF_NO_THREAD. All
      interrupts which have IRQF_TIMER set are implict marked
      IRQF_NO_THREAD. Also all PER_CPU interrupts are excluded.
      
      Forced threading hard interrupts also forces all soft interrupt
      handling into thread context.
      
      When enabled it might slow down things a bit, but for debugging problems in
      interrupt code it's a reasonable penalty as it does not immediately
      crash and burn the machine when an interrupt handler is buggy.
      
      Some test results on a Core2Duo machine:
      
      Cache cold run of:
       # time git grep irq_desc
      
            non-threaded       threaded
       real 1m18.741s          1m19.061s
       user 0m1.874s           0m1.757s
       sys  0m5.843s           0m5.427s
      
       # iperf -c server
      non-threaded
      [  3]  0.0-10.0 sec  1.09 GBytes   933 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   934 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   933 Mbits/sec
      threaded
      [  3]  0.0-10.0 sec  1.09 GBytes   939 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   934 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   937 Mbits/sec
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.772668648@linutronix.de>
      8d32a307
  2. 25 Feb, 2011 5 commits
    • Thomas Gleixner's avatar
      sched: Switch wait_task_inactive to schedule_hrtimeout() · 8eb90c30
      Thomas Gleixner authored
      When we force thread hard and soft interrupts the startup of ksoftirqd
      would hang in kthread_bind() when wait_task_inactive() calls
      schedule_timeout_uninterruptible() because there is no softirq yet
      which will wake us up.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.677109139@linutronix.de>
      8eb90c30
    • Thomas Gleixner's avatar
      genirq: Add IRQF_NO_THREAD · 0c4602ff
      Thomas Gleixner authored
      Some low level interrupts cannot be threaded even when we force thread
      all interrupt handlers. Add a flag to annotate such interrupts. Add
      all timer interrupts to this category by default.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.578893460@linutronix.de>
      0c4602ff
    • Thomas Gleixner's avatar
      genirq: Allow shared oneshot interrupts · 9d591edd
      Thomas Gleixner authored
      Support ONESHOT on shared interrupts, if all drivers agree on it.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.483640430@linutronix.de>
      9d591edd
    • Thomas Gleixner's avatar
      genirq: Prepare the handling of shared oneshot interrupts · b5faba21
      Thomas Gleixner authored
      For level type interrupts we need to track how many threads are on
      flight to avoid useless interrupt storms when not all thread handlers
      have finished yet. Keep track of the woken threads and only unmask
      when there are no more threads in flight.
      
      Yes, I'm lazy and using a bitfield. But not only because I'm lazy, the
      main reason is that it's way simpler than using a refcount. A refcount
      based solution would need to keep track of various things like
      crashing the irq thread, spurious interrupts coming in,
      disables/enables, free_irq() and some more. The bitfield keeps the
      tracking simple and makes things just work. It's also nicely confined
      to the thread code pathes and does not require additional checks all
      over the place.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.388095876@linutronix.de>
      b5faba21
    • Thomas Gleixner's avatar
      genirq: Make warning in handle_percpu_event useful · 1204e956
      Thomas Gleixner authored
      The WARN_ON_ONCE in handle_percpu_event() which emits a warning when
      an action handler returns with interrupts enabled is not really
      useful. It does not reveal the interrupt number and handler function
      which caused it. Make it WARN_ONCE() and add the information.
      Reported-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1204e956
  3. 22 Feb, 2011 2 commits
    • Jan Beulich's avatar
      genirq: Streamline kernel/irq/Kconfig · fd4afaf3
      Jan Beulich authored
      "def_bool n" without prompt is pointless, these should be just "bool".
      
      [ tglx: Adapted to latest changes ]
      Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
      LKML-Reference: <4D5D3309020000780003264A@vpn.id2.novell.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      fd4afaf3
    • Thomas Gleixner's avatar
      genirq: Use the correct variable for note_interrupt · 70433c01
      Thomas Gleixner authored
      note_interrupt wants to be called with the combined result of all
      handlers called, not with the last one. If it's a shared interrupt
      then the last handler might return IRQ_NONE often enough to trigger
      the spurious dectector which turns off a perfectly fine working
      interrupt line. Bug was introduced in commit 1277a532(genirq: Simplify
      handle_irq_event()).
      
      Yes, I really messed up there. First the variable ret should not have
      been named differently to avoid similarity with retval. Second it
      should have been declared in the do {} loop.
      
      Rename it to res and move it into the do {} loop and vanish under a
      huge brown paperbag.
      Reported-bisected-tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      70433c01
  4. 21 Feb, 2011 3 commits
  5. 19 Feb, 2011 29 commits