1. 13 1月, 2009 1 次提交
  2. 12 1月, 2009 20 次提交
    • C
      xen: fix too early kmalloc call · 28e08861
      Christophe Saout 提交于
      Impact: fix bootup crash on xen guests
      
      SLAB is not yet up, with earlyprintk it is giving me an Oops in __kmalloc.
      
      Replace call to kmalloc() with alloc_bootmem().
      Reported-by: NChristophe Saout <christophe@saout.de>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      28e08861
    • 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
      Xen: reduce memory required for cpu_evtchn_mask · c7a3589e
      Mike Travis 提交于
      Impact: reduce memory usage.
      
      Reduce this significant gain in the amount of memory used
      when NR_CPUS bumped from 128 to 4096 by allocating the
      array based on nr_cpu_ids:
      
          65536  +2031616   2097152 +3100%  cpu_evtchn_mask(.bss)
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: virtualization@lists.osdl.org
      Cc: xen-devel@lists.xensource.com
      c7a3589e
    • 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: use cpumask_var_t in dcdbas.c · c90e785b
      Mike Travis 提交于
      Impact: reduce stack usage.
      
      Replace cpumask_t with cpumask_var_t in drivers/firmware/dcdbas.c.
      Signed-off-by: NMike Travis <travis@sgi.com>
      c90e785b
    • M
      x86: reduce stack usage in init_intel_cacheinfo · f9b90566
      Mike Travis 提交于
      Impact: reduce stack usage.
      
      init_intel_cacheinfo() does not use the cpumask so define a subset
      of struct _cpuid4_info (_cpuid4_info_regs) that can be used instead.
      Signed-off-by: NMike Travis <travis@sgi.com>
      f9b90566
    • M
      x86: cleanup remaining cpumask_t code in mce_amd_64.c · a1c33bbe
      Mike Travis 提交于
      Impact: Reduce memory usage, use new cpumask API.
      
      Use cpumask_var_t for 'cpus' cpumask in struct threshold_bank and update
      remaining old cpumask_t functions to new cpumask API.
      Signed-off-by: NMike Travis <travis@sgi.com>
      a1c33bbe
    • M
      SGI UV cpumask: use static temp cpumask in flush_tlb · 0e21990a
      Mike Travis 提交于
      Impact: Improve tlb flush performance for UV
      
      Calling alloc_cpumask_var a zillion times a second does affect
      performance.  Replace with static cpumask.
      
      Note: when CONFIG_X86_UV is defined, this extra PER_CPU memory
      will be optimized out for non-UV configs as is_uv_system() will
      then return a constant 0.
      Signed-off-by: NMike Travis <travis@sgi.com>
      0e21990a
    • R
      x86: change flush_tlb_others to take a const struct cpumask · 4595f962
      Rusty Russell 提交于
      Impact: reduce stack usage, use new cpumask API.
      
      This is made a little more tricky by uv_flush_tlb_others which
      actually alters its argument, for an IPI to be sent to the remaining
      cpus in the mask.
      
      I solve this by allocating a cpumask_var_t for this case and falling back
      to IPI should this fail.
      
      To eliminate temporaries in the caller, all flush_tlb_others implementations
      now do the this-cpu-elimination step themselves.
      
      Note also the curious "cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask)"
      which has been there since pre-git and yet f->flush_cpumask is always zero
      at this point.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      4595f962
    • 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
    • R
      cpumask: convert other misc kernel functions · 651f8118
      Rusty Russell 提交于
      Impact: use new cpumask API.
      
      Convert other misc kernel functions to use struct cpumask.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      651f8118
    • R
      cpumask: convert drivers/net/sfc · 2f8975fb
      Rusty Russell 提交于
      Impact: reduce stack usage, use new cpumask API.
      
      Remove a cpumask from the stack.  Ben Hutchings indicated that printing
      a warning and returning 1 was acceptable for the corner case where allocation
      fails.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: linux-net-drivers@solarflare.com
      2f8975fb
    • R
      cpumask: convert misc driver functions · f7df8ed1
      Rusty Russell 提交于
      Impact: use new cpumask API.
      
      Convert misc driver functions to use struct cpumask.
      
      To Do:
        - Convert iucv_buffer_cpumask to cpumask_var_t.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NDean Nelson <dcn@sgi.com>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: oprofile-list@lists.sf.net
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: virtualization@lists.osdl.org
      Cc: xen-devel@lists.xensource.com
      Cc: Ursula Braun <ursula.braun@de.ibm.com>
      Cc: linux390@de.ibm.com
      Cc: linux-s390@vger.kernel.org
      f7df8ed1
    • R
      cpumask: Use topology_core_cpumask()/topology_thread_cpumask() · fbd59a8d
      Rusty Russell 提交于
      Impact: reduce stack usage, use new cpumask API.
      
      This actually uses topology_core_cpumask() and
      topology_thread_cpumask(), removing the only users of
      topology_core_siblings() and topology_thread_siblings()
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: linux-net-drivers@solarflare.com
      fbd59a8d
    • 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. 11 1月, 2009 4 次提交
  4. 10 1月, 2009 15 次提交