Skip to content
  • David Rientjes's avatar
    slub: add option to disable higher order debugging slabs · fa5ec8a1
    David Rientjes authored
    When debugging is enabled, slub requires that additional metadata be
    stored in slabs for certain options: SLAB_RED_ZONE, SLAB_POISON, and
    Consequently, it may require that the minimum possible slab order needed
    to allocate a single object be greater when using these options.  The
    most notable example is for objects that are PAGE_SIZE bytes in size.
    Higher minimum slab orders may cause page allocation failures when oom or
    under heavy fragmentation.
    This patch adds a new slub_debug option, which disables debugging by
    default for caches that would have resulted in higher minimum orders:
    When this option is used on systems with 4K pages, kmalloc-4096, for
    example, will not have debugging enabled by default even if
    CONFIG_SLUB_DEBUG_ON is defined because it would have resulted in a
    order-1 minimum slab order.
    Reported-by: default avatarLarry Finger <>
    Tested-by: default avatarLarry Finger <>
    Cc: Christoph Lameter <>
    Signed-off-by: default avatarDavid Rientjes <>
    Signed-off-by: default avatarPekka Enberg <>