Re: [PATCH v5 2/4] mm: Provide kernel parameter to allow disabling page init poisoning

From: Alexander Duyck
Date: Tue Sep 25 2018 - 16:49:09 EST




On 9/25/2018 1:26 PM, Dave Hansen wrote:
On 09/25/2018 01:20 PM, Alexander Duyck wrote:
+ vm_debug[=options] [KNL] Available with CONFIG_DEBUG_VM=y.
+ May slow down system boot speed, especially when
+ enabled on systems with a large amount of memory.
+ All options are enabled by default, and this
+ interface is meant to allow for selectively
+ enabling or disabling specific virtual memory
+ debugging features.
+
+ Available options are:
+ P Enable page structure init time poisoning
+ - Disable all of the above options

Can we have vm_debug=off for turning things off, please? That seems to
be pretty standard.

No. The simple reason for that is that you had requested this work like the slub_debug. If we are going to do that then each individual letter represents a feature. That is why the "-" represents off. We cannot have letters represent flags, and letters put together into words. For example slub_debug=OFF would turn on sanity checks and turn off debugging for caches that would have causes higher minimum slab orders.

Either I can do this as a single parameter that supports on/off semantics, or I can support it as a slub_debug type parameter that does flags based on the input options. I would rather not muddy things by trying to do both.

Also, we need to document the defaults. I think the default is "all
debug options are enabled", but it would be nice to document that.

In the description I call out "All options are enabled by default, and this interface is meant to allow for selectively enabling or disabling".