Skip to content
  • Christoph Lameter's avatar
    slub: Add kmem_cache_order_objects struct · 834f3d11
    Christoph Lameter authored
    
    
    Pack the order and the number of objects into a single word.
    This saves some memory in the kmem_cache_structure and more importantly
    allows us to fetch both values atomically.
    
    Later the slab orders become runtime configurable and we need to fetch these
    two items together in order to properly allocate a slab and initialize its
    objects.
    
    Fix the race by fetching the order and the number of objects in one word.
    
    [penberg@cs.helsinki.fi: fix memset() page order in new_slab()]
    Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
    Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
    834f3d11