[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190128122954.949c2e6699d6e5ef060a325c@linux-foundation.org>
Date: Mon, 28 Jan 2019 12:29:54 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: <miles.chen@...iatek.com>
Cc: Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
"David Rientjes" <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Jonathan Corbet <corbet@....net>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>,
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v2] mm/slub: introduce SLAB_WARN_ON_ERROR
On Thu, 24 Jan 2019 15:00:23 +0800 <miles.chen@...iatek.com> wrote:
> From: Miles Chen <miles.chen@...iatek.com>
>
> 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.
>
> Change since v1:
> 1. Add a special debug option SLAB_WARN_ON_ERROR and toggle WARN_ON()
> if it is set.
> 2. SLAB_WARN_ON_ERROR can be set by kernel parameter slub_debug.
>
Hopefully the slab developers will have an opinion on this.
> --- a/Documentation/vm/slub.rst
> +++ b/Documentation/vm/slub.rst
> @@ -52,6 +52,7 @@ Possible debug options are::
> A Toggle failslab filter mark for the cache
> O Switch debugging off for caches that would have
> caused higher minimum slab orders
> + W Toggle WARN_ON() on slab errors
> - Switch all debugging off (useful if the kernel is
> configured with CONFIG_SLUB_DEBUG_ON)
This documentation is poorly phrased. The term "toggle" means to
invert the value of a boolean: if it was 1, make it 0 and if it was 0,
make it 1. But that isn't what these options do. Something like
"enable/disable" would be better. So...
--- a/Documentation/vm/slub.rst~mm-slub-introduce-slab_warn_on_error-fix
+++ a/Documentation/vm/slub.rst
@@ -49,10 +49,10 @@ Possible debug options are::
P Poisoning (object and padding)
U User tracking (free and alloc)
T Trace (please only use on single slabs)
- A Toggle failslab filter mark for the cache
+ A Enable/disable failslab filter mark for the cache
O Switch debugging off for caches that would have
caused higher minimum slab orders
- W Toggle WARN_ON() on slab errors
+ W Enable/disable WARN_ON() on slab errors
- Switch all debugging off (useful if the kernel is
configured with CONFIG_SLUB_DEBUG_ON)
_
Powered by blists - more mailing lists