]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Aug 2010 17:08:52 +0000 (10:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Aug 2010 17:08:52 +0000 (10:08 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slab: fix object alignment
  slub: add missing __percpu markup in mm/slub_def.h

1  2 
include/linux/slub_def.h
mm/slab.c

diff --combined include/linux/slub_def.h
index 6d14409c4d9a3573c12a029e9fb48af3261cd5b0,5ec4bc0e45aafc13fe014c9ae6f47ebdf8556771..9f63538928c0451c23b02cfe00c309ea00d54534
@@@ -68,7 -68,7 +68,7 @@@ struct kmem_cache_order_objects 
   * Slab cache management.
   */
  struct kmem_cache {
-       struct kmem_cache_cpu *cpu_slab;
+       struct kmem_cache_cpu __percpu *cpu_slab;
        /* Used for retriving partial slabs etc */
        unsigned long flags;
        int size;               /* The size of an object including meta data */
  /*
   * Kmalloc subsystem.
   */
 -#if defined(ARCH_KMALLOC_MINALIGN) && ARCH_KMALLOC_MINALIGN > 8
 -#define KMALLOC_MIN_SIZE ARCH_KMALLOC_MINALIGN
 +#if defined(ARCH_DMA_MINALIGN) && ARCH_DMA_MINALIGN > 8
 +#define KMALLOC_MIN_SIZE ARCH_DMA_MINALIGN
  #else
  #define KMALLOC_MIN_SIZE 8
  #endif
  
  #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE)
  
 -#ifndef ARCH_KMALLOC_MINALIGN
 +#ifdef ARCH_DMA_MINALIGN
 +#define ARCH_KMALLOC_MINALIGN ARCH_DMA_MINALIGN
 +#else
  #define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long)
  #endif
  
diff --combined mm/slab.c
index 88435fcc8387c9bd3a4b77d5880c77790d40c780,dd41b74c8322991493628c6f67e4f81cd6e24727..fcae9815d3b35ce951669e8a404fb71b7a40d34f
+++ b/mm/slab.c
@@@ -394,7 -394,7 +394,7 @@@ static void kmem_list3_init(struct kmem
  #define       STATS_DEC_ACTIVE(x)     do { } while (0)
  #define       STATS_INC_ALLOCED(x)    do { } while (0)
  #define       STATS_INC_GROWN(x)      do { } while (0)
 -#define       STATS_ADD_REAPED(x,y)   do { } while (0)
 +#define       STATS_ADD_REAPED(x,y)   do { (void)(y); } while (0)
  #define       STATS_SET_HIGH(x)       do { } while (0)
  #define       STATS_INC_ERR(x)        do { } while (0)
  #define       STATS_INC_NODEALLOCS(x) do { } while (0)
@@@ -2330,8 -2330,8 +2330,8 @@@ kmem_cache_create (const char *name, si
        }
  #if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC)
        if (size >= malloc_sizes[INDEX_L3 + 1].cs_size
-           && cachep->obj_size > cache_line_size() && size < PAGE_SIZE) {
-               cachep->obj_offset += PAGE_SIZE - size;
+           && cachep->obj_size > cache_line_size() && ALIGN(size, align) < PAGE_SIZE) {
+               cachep->obj_offset += PAGE_SIZE - ALIGN(size, align);
                size = PAGE_SIZE;
        }
  #endif