All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/slub: fix help comment of SLUB_DEBUG[_ON]
@ 2023-02-22 23:20 Vernon Yang
  2023-02-23  1:03 ` Hyeonggon Yoo
  0 siblings, 1 reply; 4+ messages in thread
From: Vernon Yang @ 2023-02-22 23:20 UTC (permalink / raw)
  To: akpm, vbabka; +Cc: linux-mm, linux-kernel, Vernon Yang

Since commit 081248de0a02 ("kset: move /sys/slab to /sys/kernel/slab"),
the SYSFS path of slab was modified, so fix up the help comment of
SLUB_DEBUG to use the correct one.

And now the "slub_debug" parameter on boot that is support for more
fine grained debug control, so fix up help comment of SLUB_DEBUG_ON
for "no support" to "support".

Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
---
 mm/Kconfig.debug | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index fca699ad1fb0..732043bf56c6 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -61,8 +61,8 @@ config SLUB_DEBUG
 	help
 	  SLUB has extensive debug support features. Disabling these can
 	  result in significant savings in code size. This also disables
-	  SLUB sysfs support. /sys/slab will not exist and there will be
-	  no support for cache validation etc.
+	  SLUB sysfs support. /sys/kernel/slab will not exist and there
+	  will be no support for cache validation etc.
 
 config SLUB_DEBUG_ON
 	bool "SLUB debugging on by default"
@@ -73,10 +73,10 @@ config SLUB_DEBUG_ON
 	  Boot with debugging on by default. SLUB boots by default with
 	  the runtime debug capabilities switched off. Enabling this is
 	  equivalent to specifying the "slub_debug" parameter on boot.
-	  There is no support for more fine grained debug control like
-	  possible with slub_debug=xxx. SLUB debugging may be switched
-	  off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
-	  "slub_debug=-".
+	  There is support for more fine grained debug control like
+	  possible with slub_debug=xxx, details in Documentation/mm/slub.rst.
+	  SLUB debugging may be switched off in a kernel built with
+	  CONFIG_SLUB_DEBUG_ON by specifying "slub_debug=-".
 
 config PAGE_OWNER
 	bool "Track page owner"
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/slub: fix help comment of SLUB_DEBUG[_ON]
  2023-02-22 23:20 [PATCH] mm/slub: fix help comment of SLUB_DEBUG[_ON] Vernon Yang
@ 2023-02-23  1:03 ` Hyeonggon Yoo
  2023-03-13 16:26   ` Vlastimil Babka
  0 siblings, 1 reply; 4+ messages in thread
From: Hyeonggon Yoo @ 2023-02-23  1:03 UTC (permalink / raw)
  To: Vernon Yang; +Cc: akpm, vbabka, linux-mm, linux-kernel

On Thu, Feb 23, 2023 at 07:20:58AM +0800, Vernon Yang wrote:
> Since commit 081248de0a02 ("kset: move /sys/slab to /sys/kernel/slab"),
> the SYSFS path of slab was modified, so fix up the help comment of
> SLUB_DEBUG to use the correct one.
> 
> And now the "slub_debug" parameter on boot that is support for more
> fine grained debug control, so fix up help comment of SLUB_DEBUG_ON
> for "no support" to "support".
> 
> Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
> ---
>  mm/Kconfig.debug | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> index fca699ad1fb0..732043bf56c6 100644
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -61,8 +61,8 @@ config SLUB_DEBUG
>  	help
>  	  SLUB has extensive debug support features. Disabling these can
>  	  result in significant savings in code size. This also disables
> -	  SLUB sysfs support. /sys/slab will not exist and there will be
> -	  no support for cache validation etc.
> +	  SLUB sysfs support. /sys/kernel/slab will not exist and there
> +	  will be no support for cache validation etc.

After commit ab4d5ed5eeda ("slub: Enable sysfs support for !CONFIG_SLUB_DEBUG"),
"Disabling SLUB_DEBUG also disables SLUB sysfs support" is not true anymore.

>  config SLUB_DEBUG_ON
>  	bool "SLUB debugging on by default"
> @@ -73,10 +73,10 @@ config SLUB_DEBUG_ON
>  	  Boot with debugging on by default. SLUB boots by default with
>  	  the runtime debug capabilities switched off. Enabling this is
>  	  equivalent to specifying the "slub_debug" parameter on boot.
> -	  There is no support for more fine grained debug control like
> -	  possible with slub_debug=xxx. SLUB debugging may be switched
> -	  off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
> -	  "slub_debug=-".
> +	  There is support for more fine grained debug control like
> +	  possible with slub_debug=xxx, details in Documentation/mm/slub.rst.
> +	  SLUB debugging may be switched off in a kernel built with
> +	  CONFIG_SLUB_DEBUG_ON by specifying "slub_debug=-".

I think this is a misunderstanding. SLUB_DEBUG_ON is equivalent to
passing boot parameter slub_debug=FUPZ, and what the help text says is that

"You can enable slub debugging by default using this config option but
 there is no support for fine-grained control like what slub_debug
 boot parameter provides."

 IOW SLUB_DEBUG_ON cannot be used to have same effect as passing
 something like slub_debug=F.

>  
>  config PAGE_OWNER
>  	bool "Track page owner"
> -- 
> 2.34.1
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/slub: fix help comment of SLUB_DEBUG[_ON]
  2023-02-23  1:03 ` Hyeonggon Yoo
@ 2023-03-13 16:26   ` Vlastimil Babka
  2023-03-14  6:33     ` Vernon Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Vlastimil Babka @ 2023-03-13 16:26 UTC (permalink / raw)
  To: Hyeonggon Yoo, Vernon Yang; +Cc: akpm, linux-mm, linux-kernel

On 2/23/23 02:03, Hyeonggon Yoo wrote:
> On Thu, Feb 23, 2023 at 07:20:58AM +0800, Vernon Yang wrote:
>> Since commit 081248de0a02 ("kset: move /sys/slab to /sys/kernel/slab"),
>> the SYSFS path of slab was modified, so fix up the help comment of
>> SLUB_DEBUG to use the correct one.
>> 
>> And now the "slub_debug" parameter on boot that is support for more
>> fine grained debug control, so fix up help comment of SLUB_DEBUG_ON
>> for "no support" to "support".
>> 
>> Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
>> ---
>>  mm/Kconfig.debug | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>> 
>> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
>> index fca699ad1fb0..732043bf56c6 100644
>> --- a/mm/Kconfig.debug
>> +++ b/mm/Kconfig.debug
>> @@ -61,8 +61,8 @@ config SLUB_DEBUG
>>  	help
>>  	  SLUB has extensive debug support features. Disabling these can
>>  	  result in significant savings in code size. This also disables
>> -	  SLUB sysfs support. /sys/slab will not exist and there will be
>> -	  no support for cache validation etc.
>> +	  SLUB sysfs support. /sys/kernel/slab will not exist and there
>> +	  will be no support for cache validation etc.
> 
> After commit ab4d5ed5eeda ("slub: Enable sysfs support for !CONFIG_SLUB_DEBUG"),
> "Disabling SLUB_DEBUG also disables SLUB sysfs support" is not true anymore.

Yeah we could say that /sys/kernel/slab will exist but will not provide e.g.
cache validation.

>>  config SLUB_DEBUG_ON
>>  	bool "SLUB debugging on by default"
>> @@ -73,10 +73,10 @@ config SLUB_DEBUG_ON
>>  	  Boot with debugging on by default. SLUB boots by default with
>>  	  the runtime debug capabilities switched off. Enabling this is
>>  	  equivalent to specifying the "slub_debug" parameter on boot.
>> -	  There is no support for more fine grained debug control like
>> -	  possible with slub_debug=xxx. SLUB debugging may be switched
>> -	  off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
>> -	  "slub_debug=-".
>> +	  There is support for more fine grained debug control like
>> +	  possible with slub_debug=xxx, details in Documentation/mm/slub.rst.
>> +	  SLUB debugging may be switched off in a kernel built with
>> +	  CONFIG_SLUB_DEBUG_ON by specifying "slub_debug=-".
> 
> I think this is a misunderstanding. SLUB_DEBUG_ON is equivalent to
> passing boot parameter slub_debug=FUPZ, and what the help text says is that
> 
> "You can enable slub debugging by default using this config option but
>  there is no support for fine-grained control like what slub_debug
>  boot parameter provides."
> 
>  IOW SLUB_DEBUG_ON cannot be used to have same effect as passing
>  something like slub_debug=F.

Agree with both comments. Vernon, will you send an updated patch?

>>  
>>  config PAGE_OWNER
>>  	bool "Track page owner"
>> -- 
>> 2.34.1
>> 
>> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/slub: fix help comment of SLUB_DEBUG[_ON]
  2023-03-13 16:26   ` Vlastimil Babka
@ 2023-03-14  6:33     ` Vernon Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Vernon Yang @ 2023-03-14  6:33 UTC (permalink / raw)
  To: Vlastimil Babka; +Cc: Hyeonggon Yoo, akpm, linux-mm, linux-kernel

On Mon, Mar 13, 2023 at 05:26:19PM +0100, Vlastimil Babka wrote:
> On 2/23/23 02:03, Hyeonggon Yoo wrote:
> > On Thu, Feb 23, 2023 at 07:20:58AM +0800, Vernon Yang wrote:
> >> Since commit 081248de0a02 ("kset: move /sys/slab to /sys/kernel/slab"),
> >> the SYSFS path of slab was modified, so fix up the help comment of
> >> SLUB_DEBUG to use the correct one.
> >>
> >> And now the "slub_debug" parameter on boot that is support for more
> >> fine grained debug control, so fix up help comment of SLUB_DEBUG_ON
> >> for "no support" to "support".
> >>
> >> Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
> >> ---
> >>  mm/Kconfig.debug | 12 ++++++------
> >>  1 file changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> >> index fca699ad1fb0..732043bf56c6 100644
> >> --- a/mm/Kconfig.debug
> >> +++ b/mm/Kconfig.debug
> >> @@ -61,8 +61,8 @@ config SLUB_DEBUG
> >>  	help
> >>  	  SLUB has extensive debug support features. Disabling these can
> >>  	  result in significant savings in code size. This also disables
> >> -	  SLUB sysfs support. /sys/slab will not exist and there will be
> >> -	  no support for cache validation etc.
> >> +	  SLUB sysfs support. /sys/kernel/slab will not exist and there
> >> +	  will be no support for cache validation etc.
> >
> > After commit ab4d5ed5eeda ("slub: Enable sysfs support for !CONFIG_SLUB_DEBUG"),
> > "Disabling SLUB_DEBUG also disables SLUB sysfs support" is not true anymore.

Yes, You are right. Thanks.

>
> Yeah we could say that /sys/kernel/slab will exist but will not provide e.g.
> cache validation.

OK.

>
> >>  config SLUB_DEBUG_ON
> >>  	bool "SLUB debugging on by default"
> >> @@ -73,10 +73,10 @@ config SLUB_DEBUG_ON
> >>  	  Boot with debugging on by default. SLUB boots by default with
> >>  	  the runtime debug capabilities switched off. Enabling this is
> >>  	  equivalent to specifying the "slub_debug" parameter on boot.
> >> -	  There is no support for more fine grained debug control like
> >> -	  possible with slub_debug=xxx. SLUB debugging may be switched
> >> -	  off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
> >> -	  "slub_debug=-".
> >> +	  There is support for more fine grained debug control like
> >> +	  possible with slub_debug=xxx, details in Documentation/mm/slub.rst.
> >> +	  SLUB debugging may be switched off in a kernel built with
> >> +	  CONFIG_SLUB_DEBUG_ON by specifying "slub_debug=-".
> >
> > I think this is a misunderstanding. SLUB_DEBUG_ON is equivalent to

Yeah, This is a misunderstanding. I remove this.

> > passing boot parameter slub_debug=FUPZ, and what the help text says is that
> >
> > "You can enable slub debugging by default using this config option but
> >  there is no support for fine-grained control like what slub_debug
> >  boot parameter provides."
> >
> >  IOW SLUB_DEBUG_ON cannot be used to have same effect as passing
> >  something like slub_debug=F.
>
> Agree with both comments. Vernon, will you send an updated patch?

Ok, I'll be sending a new patch shortly.

>
> >>
> >>  config PAGE_OWNER
> >>  	bool "Track page owner"
> >> --
> >> 2.34.1
> >>
> >>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-14  6:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 23:20 [PATCH] mm/slub: fix help comment of SLUB_DEBUG[_ON] Vernon Yang
2023-02-23  1:03 ` Hyeonggon Yoo
2023-03-13 16:26   ` Vlastimil Babka
2023-03-14  6:33     ` Vernon Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.