• C
    slub: Add kmem_cache_order_objects struct · 834f3d11
    Christoph Lameter 提交于
    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: NChristoph Lameter <clameter@sgi.com>
    Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
    834f3d11
slub.c 104.5 KB