1. 04 10月, 2010 7 次提交
  2. 13 4月, 2010 1 次提交
    • I
      genirq: Run irq handlers with interrupts disabled · e58aa3d2
      Ingo Molnar 提交于
      Running interrupt handlers with interrupts enabled can cause stack
      overflows. That has been observed with multiqueue NICs delivering all
      their interrupts to a single core. We might band aid that somehow by
      checking the interrupt stacks, but the real safe fix is to run the irq
      handlers with interrupts disabled.
      
      Drivers for whacky hardware still can reenable them in the handler
      itself, if the need arises. (They do already due to lockdep)
      
      The risk of doing this is rather low:
      
       - lockdep already enforces this
       - CONFIG_NOHZ has shaken out the drivers which relied on jiffies updates
       - time keeping is not longer sensitive to the timer interrupt being delayed
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Linus Torvalds <torvalds@osdl.org>
      LKML-Reference: <20100326000405.758579387@linutronix.de>
      e58aa3d2
  3. 18 2月, 2010 3 次提交
  4. 15 12月, 2009 1 次提交
  5. 12 10月, 2009 1 次提交
  6. 29 8月, 2009 1 次提交
  7. 12 6月, 2009 3 次提交
    • Y
      irq: slab alloc for default irq_affinity · 28be225b
      Yinghai Lu 提交于
      Ingo had
      
      [    0.000000] ------------[ cut here ]------------
      [    0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x2b/0x71()
      [    0.000000] Hardware name: System Product Name
      [    0.000000] Modules linked in:
      [    0.000000] Pid: 0, comm: swapper Tainted: G        W  2.6.30-tip-03087-g0bb2618-dirty #52506
      [    0.000000] Call Trace:
      [    0.000000]  [<81032588>] warn_slowpath_common+0x60/0x90
      [    0.000000]  [<810325c5>] warn_slowpath_null+0xd/0x10
      [    0.000000]  [<819d1bc0>] alloc_arch_preferred_bootmem+0x2b/0x71
      [    0.000000]  [<819d1c31>] ___alloc_bootmem_nopanic+0x2b/0x9a
      [    0.000000]  [<81050a0a>] ? lock_release+0xac/0xb2
      [    0.000000]  [<819d1d4c>] ___alloc_bootmem+0xe/0x2d
      [    0.000000]  [<819d1e9f>] __alloc_bootmem+0xa/0xc
      [    0.000000]  [<819d7c63>] alloc_bootmem_cpumask_var+0x21/0x26
      [    0.000000]  [<819d0cc8>] early_irq_init+0x15/0x10d
      [    0.000000]  [<819bb75a>] start_kernel+0x167/0x326
      [    0.000000]  [<819bb06b>] __init_begin+0x6b/0x70
      [    0.000000] ---[ end trace 4eaa2a86a8e2da23 ]---
      [    0.000000] NR_IRQS:2304 nr_irqs:424
      [    0.000000] CPU 0 irqstacks, hard=821e6000 soft=821e7000
      
      we need to update init_irq_default_affinity
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      28be225b
    • P
      irq: use kcalloc() instead of the bootmem allocator · 22fb4e71
      Pekka Enberg 提交于
      Fixes the following problem:
      
      [    0.000000] Experimental hierarchical RCU init done.
      [    0.000000] NR_IRQS:4352 nr_irqs:256
      [    0.000000] ------------[ cut here ]------------
      [    0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x40/0x7e()
      [    0.000000] Hardware name: To Be Filled By O.E.M.
      [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.30-tip-02161-g7a74539-dirty #59709
      [    0.000000] Call Trace:
      [    0.000000]  [<ffffffff823f8c8e>] ? alloc_arch_preferred_bootmem+0x40/0x7e
      [    0.000000]  [<ffffffff81067168>] warn_slowpath_common+0x88/0xcb
      [    0.000000]  [<ffffffff810671d2>] warn_slowpath_null+0x27/0x3d
      [    0.000000]  [<ffffffff823f8c8e>] alloc_arch_preferred_bootmem+0x40/0x7e
      [    0.000000]  [<ffffffff823f9307>] ___alloc_bootmem_nopanic+0x4e/0xec
      [    0.000000]  [<ffffffff823f93c5>] ___alloc_bootmem+0x20/0x61
      [    0.000000]  [<ffffffff823f962e>] __alloc_bootmem+0x1e/0x34
      [    0.000000]  [<ffffffff823f757c>] early_irq_init+0x6d/0x118
      [    0.000000]  [<ffffffff823e0140>] ? early_idt_handler+0x0/0x71
      [    0.000000]  [<ffffffff823e0cf7>] start_kernel+0x192/0x394
      [    0.000000]  [<ffffffff823e0140>] ? early_idt_handler+0x0/0x71
      [    0.000000]  [<ffffffff823e02ad>] x86_64_start_reservations+0xb4/0xcf
      [    0.000000]  [<ffffffff823e0000>] ? __init_begin+0x0/0x140
      [    0.000000]  [<ffffffff823e0420>] x86_64_start_kernel+0x158/0x17b
      [    0.000000] ---[ end trace a7919e7f17c0a725 ]---
      [    0.000000] Fast TSC calibration using PIT
      [    0.000000] Detected 2002.510 MHz processor.
      [    0.004000] Console: colour VGA+ 80x25
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      22fb4e71
    • Y
      irq/cpumask: make memoryless node zero happy · dad213ae
      Yinghai Lu 提交于
      Don't hardcode to node zero for early boot IRQ setup memory allocations.
      
      [ penberg@cs.helsinki.fi: minor cleanups ]
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      dad213ae
  8. 23 5月, 2009 1 次提交
    • P
      sparseirq: Allow early irq_desc allocation · 948cd529
      Paul Mundt 提交于
      Presently non-legacy IRQs have their irq_desc allocated with
      kzalloc_node(). This assumes that all callers of irq_to_desc_node_alloc()
      will be sufficiently late in the boot process that kmalloc is available.
      
      While porting sparseirq support to sh this blew up immediately, as at the
      time that we register the CPU's interrupt vector map only bootmem is
      available. Check slab_is_available() to work out which path to use.
      
      [ Impact: fix SH early boot crash with sparseirq enabled ]
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Mel Gorman <mel@csn.ul.ie>
      LKML-Reference: <20090522014008.GA2806@linux-sh.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      948cd529
  9. 01 5月, 2009 1 次提交
  10. 29 4月, 2009 1 次提交
    • H
      tracing: fix build failure on s390 · a0e39ed3
      Heiko Carstens 提交于
      "tracing: create automated trace defines" causes this compile error on s390,
      as reported by Sachin Sant against linux-next:
      
       kernel/built-in.o: In function `__do_softirq':
       (.text+0x1c680): undefined reference to `__tracepoint_softirq_entry'
      
      This happens because the definitions of the softirq tracepoints were moved
      from kernel/softirq.c to kernel/irq/handle.c. Since s390 doesn't support
      generic hardirqs handle.c doesn't get compiled and the definitions are
      missing.
      
      So move the tracepoints to softirq.c again.
      
      [ Impact: fix build failure on s390 ]
      Reported-by: NSachin Sant <sachinp@in.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: fweisbec@gmail.com
      LKML-Reference: <20090429135139.5fac79b8@osiris.boeblingen.de.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a0e39ed3
  11. 28 4月, 2009 3 次提交
    • Y
      x86/irq: change irq_desc_alloc() to take node instead of cpu · 85ac16d0
      Yinghai Lu 提交于
      This simplifies the node awareness of the code. All our allocators
      only deal with a NUMA node ID locality not with CPU ids anyway - so
      there's no need to maintain (and transform) a CPU id all across the
      IRq layer.
      
      v2: keep move_irq_desc related
      
      [ Impact: cleanup, prepare IRQ code to be NUMA-aware ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      LKML-Reference: <49F65536.2020300@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      85ac16d0
    • Y
      x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC · fcef5911
      Yinghai Lu 提交于
      The original feature of migrating irq_desc dynamic was too fragile
      and was causing problems: it caused crashes on systems with lots of
      cards with MSI-X when user-space irq-balancer was enabled.
      
      We now have new patches that create irq_desc according to device
      numa node. This patch removes the leftover bits of the dynamic balancer.
      
      [ Impact: remove dead code ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      LKML-Reference: <49F654AF.8000808@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fcef5911
    • Y
      irq, cpumask: correct CPUMASKS_OFFSTACK typo and fix fallout · 9ec4fa27
      Yinghai Lu 提交于
      CPUMASKS_OFFSTACK is not defined anywhere (it is CPUMASK_OFFSTACK).
      It is a typo and init_allocate_desc_masks() is called before it set
      affinity to all cpus...
      
      Split init_alloc_desc_masks() into all_desc_masks() and init_desc_masks().
      
      Also use CPUMASK_OFFSTACK in alloc_desc_masks().
      
      [ Impact: fix smp_affinity copying/setup when moving irq_desc between CPUs ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      LKML-Reference: <49F6546E.3040406@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9ec4fa27
  12. 15 4月, 2009 2 次提交
    • S
      tracing/events: move trace point headers into include/trace/events · ad8d75ff
      Steven Rostedt 提交于
      Impact: clean up
      
      Create a sub directory in include/trace called events to keep the
      trace point headers in their own separate directory. Only headers that
      declare trace points should be defined in this directory.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Zhao Lei <zhaolei@cn.fujitsu.com>
      Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      ad8d75ff
    • S
      tracing: create automated trace defines · a8d154b0
      Steven Rostedt 提交于
      This patch lowers the number of places a developer must modify to add
      new tracepoints. The current method to add a new tracepoint
      into an existing system is to write the trace point macro in the
      trace header with one of the macros TRACE_EVENT, TRACE_FORMAT or
      DECLARE_TRACE, then they must add the same named item into the C file
      with the macro DEFINE_TRACE(name) and then add the trace point.
      
      This change cuts out the needing to add the DEFINE_TRACE(name).
      Every file that uses the tracepoint must still include the trace/<type>.h
      file, but the one C file must also add a define before the including
      of that file.
      
       #define CREATE_TRACE_POINTS
       #include <trace/mytrace.h>
      
      This will cause the trace/mytrace.h file to also produce the C code
      necessary to implement the trace point.
      
      Note, if more than one trace/<type>.h is used to create the C code
      it is best to list them all together.
      
       #define CREATE_TRACE_POINTS
       #include <trace/foo.h>
       #include <trace/bar.h>
       #include <trace/fido.h>
      
      Thanks to Mathieu Desnoyers and Christoph Hellwig for coming up with
      the cleaner solution of the define above the includes over my first
      design to have the C code include a "special" header.
      
      This patch converts sched, irq and lockdep and skb to use this new
      method.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Zhao Lei <zhaolei@cn.fujitsu.com>
      Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      a8d154b0
  13. 24 3月, 2009 2 次提交
    • T
      genirq: threaded irq handlers review fixups · f48fe81e
      Thomas Gleixner 提交于
      Delta patch to address the review comments.
      
            - Implement warning when IRQ_WAKE_THREAD is requested and no
              thread handler installed
            - coding style fixes
      Pointed-out-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f48fe81e
    • T
      genirq: add threaded interrupt handler support · 3aa551c9
      Thomas Gleixner 提交于
      Add support for threaded interrupt handlers:
      
      A device driver can request that its main interrupt handler runs in a
      thread. To achive this the device driver requests the interrupt with
      request_threaded_irq() and provides additionally to the handler a
      thread function. The handler function is called in hard interrupt
      context and needs to check whether the interrupt originated from the
      device. If the interrupt originated from the device then the handler
      can either return IRQ_HANDLED or IRQ_WAKE_THREAD. IRQ_HANDLED is
      returned when no further action is required. IRQ_WAKE_THREAD causes
      the genirq code to invoke the threaded (main) handler. When
      IRQ_WAKE_THREAD is returned handler must have disabled the interrupt
      on the device level. This is mandatory for shared interrupt handlers,
      but we need to do it as well for obscure x86 hardware where disabling
      an interrupt on the IO_APIC level redirects the interrupt to the
      legacy PIC interrupt lines.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      3aa551c9
  14. 13 3月, 2009 1 次提交
  15. 03 3月, 2009 1 次提交
  16. 27 2月, 2009 1 次提交
  17. 09 2月, 2009 2 次提交
  18. 28 1月, 2009 1 次提交
  19. 13 1月, 2009 1 次提交
  20. 12 1月, 2009 6 次提交
    • M
      cpumask, irq: non-x86 build failures · 92296c6d
      Mike Travis 提交于
      Ingo Molnar wrote:
      
      > All non-x86 architectures fail to build:
      >
      > In file included from /home/mingo/tip/include/linux/random.h:11,
      >                  from /home/mingo/tip/include/linux/stackprotector.h:6,
      >                  from /home/mingo/tip/init/main.c:17:
      > /home/mingo/tip/include/linux/irqnr.h:26:63: error: asm/irq_vectors.h: No such file or directory
      
      Do not include asm/irq_vectors.h in generic code - it's not available
      on all architectures.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      92296c6d
    • M
      kstat: modify kstat_irqs_legacy to be variable sized · 542d865b
      Mike Travis 提交于
      Impact: reduce memory usage.
      
      Allocate kstat_irqs_legacy based on nr_cpu_ids to deal with this
      memory usage bump when NR_CPUS bumped from 128 to 4096:
      
           8192   +253952    262144 +3100%  kstat_irqs_legacy(.bss)
      
      This is only when CONFIG_SPARSE_IRQS=y.
      Signed-off-by: NMike Travis <travis@sgi.com>
      542d865b
    • M
      irq: initialize nr_irqs based on nr_cpu_ids · 9332fccd
      Mike Travis 提交于
      Impact: Reduce memory usage.
      
      This is the second half of the changes to make the irq_desc_ptrs be
      variable sized based on nr_cpu_ids.  This is done by adding a new
      "max_nr_irqs" macro to irq_vectors.h (and a dummy in irqnr.h) to
      return a max NR_IRQS value based on NR_CPUS or nr_cpu_ids.
      
      This necessitated moving the define of MAX_IO_APICS to a separate
      file (asm/apicnum.h) so it could be included without the baggage
      of the other asm/apicdef.h declarations.
      Signed-off-by: NMike Travis <travis@sgi.com>
      9332fccd
    • M
      irq: allocate irq_desc_ptrs array based on nr_irqs · 0fa0ebbf
      Mike Travis 提交于
      Impact: allocate irq_desc_ptrs in preparation for making it variable-sized.
      
      This addresses this memory usage bump when NR_CPUS bumped from 128 to 4096:
      
          34816   +229376    264192  +658%  irq_desc_ptrs(.data.read_mostly)
      
      The patch is split into two parts, the first simply allocates the
      irq_desc_ptrs array.  Then next will deal with making it variable.
      This is only when CONFIG_SPARSE_IRQS=y.
      Signed-off-by: NMike Travis <travis@sgi.com>
      0fa0ebbf
    • M
      irq: use WARN() instead of WARN_ON(). · e2f4d065
      Mike Travis 提交于
      Impact: cleanup WARN msg.
      
      Ingo requested:
      > While at it, could you please also convert this to a WARN() construct
      > instead? (in a separate commit)
      
      ... and it shall be done.  ;-)
      Signed-off-by: NMike Travis <travis@sgi.com>
      e2f4d065
    • M
      irq: change references from NR_IRQS to nr_irqs · 9594949b
      Mike Travis 提交于
      Impact: preparation, cleanup, add KERN_INFO printk
      
      Modify references from NR_IRQS to nr_irqs as the later will become
      variable-sized based on nr_cpu_ids when CONFIG_SPARSE_IRQS=y.
      Signed-off-by: NMike Travis <travis@sgi.com>
      9594949b