• Christoph Lameter's avatar
    slab: Simplify bootstrap · 3c583465
    Christoph Lameter authored
    The nodelists field in kmem_cache is pointing to the first unused
    object in the array field when bootstrap is complete.
    
    A problem with the current approach is that the statically sized
    kmem_cache structure use on boot can only contain NR_CPUS entries.
    If the number of nodes plus the number of cpus is greater then we
    would overwrite memory following the kmem_cache_boot definition.
    
    Increase the size of the array field to ensure that also the node
    pointers fit into the array field.
    
    Once we do that we no longer need the kmem_cache_nodelists
    array and we can then also use that structure elsewhere.
    Acked-by: default avatarGlauber Costa <glommer@parallels.com>
    Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
    Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
    3c583465
slab.c 118 KB