Open main menu

OpenVZ Virtuozzo Containers Wiki β

Kernel debug options

This page describes some debugging, that can be turned on in order to find more info about an oops/bug/deadlock/etc

Contents

Memory debugging options

There are two sets of options, depending on what kind of memory allocator you use

SLAB

If you have a

CONFIG_SLAB=y
# CONFIG_SLUB is not set

disposition in your config file, then the proper debugging options are

CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_SLAB_LEAK=y

SLUB

If you have a

# CONFIG_SLAB is not set
CONFIG_SLUB=y

set of options, then your choice should be

CONFIG_SLUB_DEBUG=y
CONFIG_SLUB_DEBUG_ON=y

Locking debugging

The following options are useful when debugging various deadlocks and memory corruptions. They produce some performance loss, however.

CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_DEBUG_LIST=y

There are some others, but the above are minimal set.