Re: [PATCH v2] mm/slub: introduce SLAB_WARN_ON_ERROR

From: David Rientjes
Date: Mon Jan 28 2019 - 20:42:07 EST


On Thu, 24 Jan 2019, miles.chen@xxxxxxxxxxxx wrote:

> From: Miles Chen <miles.chen@xxxxxxxxxxxx>
>
> When debugging slab errors in slub.c, sometimes we have to trigger
> a panic in order to get the coredump file. Add a debug option
> SLAB_WARN_ON_ERROR to toggle WARN_ON() when the option is set.
>

Wouldn't it be better to enable/disable this for all slab caches instead
of individual caches at runtime? I'm not sure excluding some caches
because you know they'll WARN and trigger panic_on_warn unnecessarily is
valid since it could be enabled for that cache as well through this
interface.