• Vlastimil Babka's avatar
    mm, slub: remove percpu slabs with CONFIG_SLUB_TINY · 0af8489b
    Vlastimil Babka authored
    SLUB gets most of its scalability by percpu slabs. However for
    CONFIG_SLUB_TINY the goal is minimal memory overhead, not scalability.
    Thus, #ifdef out the whole kmem_cache_cpu percpu structure and
    associated code. Additionally to the slab page savings, this reduces
    percpu allocator usage, and code size.
    
    This change builds on recent commit c7323a5a ("mm/slub: restrict
    sysfs validation to debug caches and make it safe"), as caches with
    enabled debugging also avoid percpu slabs and all allocations and
    freeing ends up working with the partial list. With a bit more
    refactoring by the preceding patches, use the same code paths with
    CONFIG_SLUB_TINY.
    Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
    Reviewed-by: default avatarChristoph Lameter <cl@linux.com>
    0af8489b
slub_def.h 6.07 KB