1. 10 8月, 2007 5 次提交
    • A
      [POWERPC] cell: Move SPU affinity init to spu_management_of_ops · f5996449
      Andre Detsch 提交于
      This patch moves affinity initialization code from spu_base.c to a
      new spu_management_of_ops function (init_affinity), which is empty
      in the case of PS3. This fixes a linking problem that was happening
      when compiling for PS3.
      Also, some small code style changes were made.
      Signed-off-by: NAndre Detsch <adetsch@br.ibm.com>
      Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Acked-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f5996449
    • P
      [POWERPC] Fix potential duplicate entry in SLB shadow buffer · edd0622b
      Paul Mackerras 提交于
      We were getting a duplicate entry in the SLB shadow buffer in
      slb_flush_and_rebolt() if the kernel stack was in the same segment
      as PAGE_OFFSET, which on POWER6 causes the hypervisor to terminate
      the partition with an error.  This fixes it.
      
      Also we were not creating an SLB entry (or an SLB shadow buffer
      entry) for the kernel stack on secondary CPUs when starting the
      CPU.  This isn't a major problem, since an appropriate entry will
      be created on demand, but this fixes that also for consistency.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      edd0622b
    • J
      SLUB: Fix format specifier in Documentation/vm/slabinfo.c · ac078602
      Jesper Juhl 提交于
      There's a little problem in Documentation/vm/slabinfo.c
      The code is using "%d" in a printf() call to print an 'unsigned long'.
      This patch corrects it to use "%lu" instead.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      ac078602
    • C
      SLUB: Fix dynamic dma kmalloc cache creation · 1ceef402
      Christoph Lameter 提交于
      The dynamic dma kmalloc creation can run into trouble if a
      GFP_ATOMIC allocation is the first one performed for a certain size
      of dma kmalloc slab.
      
      - Move the adding of the slab to sysfs into a workqueue
        (sysfs does GFP_KERNEL allocations)
      - Do not call kmem_cache_destroy() (uses slub_lock)
      - Only acquire the slub_lock once and--if we cannot wait--do a trylock.
      
        This introduces a slight risk of the first kmalloc(x, GFP_DMA|GFP_ATOMIC)
        for a range of sizes failing due to another process holding the slub_lock.
        However, we only need to acquire the spinlock once in order to establish
        each power of two DMA kmalloc cache. The possible conflict is with the
        slub_lock taken during slab management actions (create / remove slab cache).
      
        It is rather typical that a driver will first fill its buffers using
        GFP_KERNEL allocations which will wait until the slub_lock can be acquired.
        Drivers will also create its slab caches first outside of an atomic
        context before starting to use atomic kmalloc from an interrupt context.
      
        If there are any failures then they will occur early after boot or when
        loading of multiple drivers concurrently. Drivers can already accomodate
        failures of GFP_ATOMIC for other reasons. Retries will then create the slab.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      1ceef402
    • C
      SLUB: Remove checks for MAX_PARTIAL from kmem_cache_shrink · fcda3d89
      Christoph Lameter 提交于
      The MAX_PARTIAL checks were supposed to be an optimization. However, slab
      shrinking is a manually triggered process either through running slabinfo
      or by the kernel calling kmem_cache_shrink.
      
      If one really wants to shrink a slab then all operations should be done
      regardless of the size of the partial list. This also fixes an issue that
      could surface if the number of partial slabs was initially above MAX_PARTIAL
      in kmem_cache_shrink and later drops below MAX_PARTIAL through the
      elimination of empty slabs on the partial list (rare). In that case a few
      slabs may be left off the partial list (and only be put back when they
      are empty).
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      fcda3d89
  2. 09 8月, 2007 35 次提交