1. 28 6月, 2010 2 次提交
    • T
      percpu: allow limited allocation before slab is online · 099a19d9
      Tejun Heo 提交于
      This patch updates percpu allocator such that it can serve limited
      amount of allocation before slab comes online.  This is primarily to
      allow slab to depend on working percpu allocator.
      
      Two parameters, PERCPU_DYNAMIC_EARLY_SIZE and SLOTS, determine how
      much memory space and allocation map slots are reserved.  If this
      reserved area is exhausted, WARN_ON_ONCE() will trigger and allocation
      will fail till slab comes online.
      
      The following changes are made to implement early alloc.
      
      * pcpu_mem_alloc() now checks slab_is_available()
      
      * Chunks are allocated using pcpu_mem_alloc()
      
      * Init paths make sure ai->dyn_size is at least as large as
        PERCPU_DYNAMIC_EARLY_SIZE.
      
      * Initial alloc maps are allocated in __initdata and copied to
        kmalloc'd areas once slab is online.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      099a19d9
    • T
      percpu: make @dyn_size always mean min dyn_size in first chunk init functions · 4ba6ce25
      Tejun Heo 提交于
      In pcpu_build_alloc_info() and pcpu_embed_first_chunk(), @dyn_size was
      ssize_t, -1 meant auto-size, 0 forced 0 and positive meant minimum
      size.  There's no use case for forcing 0 and the upcoming early alloc
      support always requires non-zero dynamic size.  Make @dyn_size always
      mean minimum dyn_size.
      
      While at it, make pcpu_build_alloc_info() static which doesn't have
      any external caller as suggested by David Rientjes.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      4ba6ce25
  2. 18 6月, 2010 1 次提交
    • T
      percpu: fix first chunk match in per_cpu_ptr_to_phys() · 9983b6f0
      Tejun Heo 提交于
      per_cpu_ptr_to_phys() determines whether the passed in @addr belongs
      to the first_chunk or not by just matching the address against the
      address range of the base unit (unit0, used by cpu0).  When an adress
      from another cpu was passed in, it will always determine that the
      address doesn't belong to the first chunk even when it does.  This
      makes the function return a bogus physical address which may lead to
      crash.
      
      This problem was discovered by Cliff Wickman while investigating a
      crash during kdump on a SGI UV system.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NCliff Wickman <cpw@sgi.com>
      Tested-by: NCliff Wickman <cpw@sgi.com>
      Cc: stable@kernel.org
      9983b6f0
  3. 17 6月, 2010 1 次提交
  4. 12 6月, 2010 27 次提交
  5. 11 6月, 2010 9 次提交