1. 13 1月, 2009 1 次提交
  2. 12 1月, 2009 9 次提交
    • 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
    • M
      cpumask: reduce stack usage in find_lowest_rq · d38b223c
      Mike Travis 提交于
      Impact: reduce stack usage, cleanup
      
      Use a cpumask_var_t in find_lowest_rq() and clean up other old
      cpumask_t calls.
      Signed-off-by: NMike Travis <travis@sgi.com>
      d38b223c
    • M
      cpumask: fix bug in use cpumask_var_t in irq_desc · 802bf931
      Mike Travis 提交于
      Impact: fix bug where new irq_desc uses old cpumask pointers which are freed.
      
      As Yinghai pointed out, init_copy_one_irq_desc() copies the old desc to
      the new desc overwriting the cpumask pointers.  Since the old_desc and
      the cpumask pointers are freed, then memory corruption will occur if
      these old pointers are used.
      
      Move the allocation of these pointers to after the copy.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      802bf931
    • M
      cpumask: update irq_desc to use cpumask_var_t · 7f7ace0c
      Mike Travis 提交于
      Impact: reduce memory usage, use new cpumask API.
      
      Replace the affinity and pending_masks with cpumask_var_t's.  This adds
      to the significant size reduction done with the SPARSE_IRQS changes.
      
      The added functions (init_alloc_desc_masks & init_copy_desc_masks) are
      in the include file so they can be inlined (and optimized out for the
      !CONFIG_CPUMASKS_OFFSTACK case.)  [Naming chosen to be consistent with
      the other init*irq functions, as well as the backwards arg declaration
      of "from, to" instead of the more common "to, from" standard.]
      
      Includes a slight change to the declaration of struct irq_desc to embed
      the pending_mask within ifdef(CONFIG_SMP) to be consistent with other
      references, and some small changes to Xen.
      
      Tested: sparse/non-sparse/cpumask_offstack/non-cpumask_offstack/nonuma/nosmp on x86_64
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: virtualization@lists.osdl.org
      Cc: xen-devel@lists.xensource.com
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      7f7ace0c
  3. 10 1月, 2009 3 次提交
  4. 09 1月, 2009 27 次提交