diff mbox series

kernel: provide better control & help for SLUB configuration

Message ID 20231107222552.11925-1-zajec5@gmail.com
State Accepted
Delegated to: Rafał Miłecki
Headers show
Series kernel: provide better control & help for SLUB configuration | expand

Commit Message

Rafał Miłecki Nov. 7, 2023, 10:25 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Allow selecting KERNEL_SLUB_DEBUG and KERNEL_SLUB_DEBUG_ON manually and
provide detailed help for both.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 config/Config-kernel.in | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Comments

Thibaut Nov. 8, 2023, 8:13 a.m. UTC | #1
Hi,

> Le 7 nov. 2023 à 23:25, Rafał Miłecki <zajec5@gmail.com> a écrit :
> 
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Allow selecting KERNEL_SLUB_DEBUG and KERNEL_SLUB_DEBUG_ON manually and
> provide detailed help for both.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> config/Config-kernel.in | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/config/Config-kernel.in b/config/Config-kernel.in
> index a1209d82f3..4529c81fc7 100644
> --- a/config/Config-kernel.in
> +++ b/config/Config-kernel.in
> @@ -682,10 +682,21 @@ config KERNEL_PRINTK_TIME
> 	default y
> 
> config KERNEL_SLUB_DEBUG
> -	bool
> +	bool "Enable SLUB debugging support"
> +	help
> +	  This enables various debugging features:
> +	    - Accepts "slub_debug" kernel parameter
> +	    - Provides caches debugging options (e.g. tracing, validating)
> +	    - Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
> +	    - Enables /proc/slabinfo support
> +	    - Prints into when running out of memory

Prints /info/ ?

Also following your previous patch, shouldn’t the help text mention that enabling this option results in significant increase in code size?

Cheers,
T
diff mbox series

Patch

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index a1209d82f3..4529c81fc7 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -682,10 +682,21 @@  config KERNEL_PRINTK_TIME
 	default y
 
 config KERNEL_SLUB_DEBUG
-	bool
+	bool "Enable SLUB debugging support"
+	help
+	  This enables various debugging features:
+	    - Accepts "slub_debug" kernel parameter
+	    - Provides caches debugging options (e.g. tracing, validating)
+	    - Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
+	    - Enables /proc/slabinfo support
+	    - Prints into when running out of memory
 
 config KERNEL_SLUB_DEBUG_ON
-	bool
+	depends on KERNEL_SLUB_DEBUG
+	bool "Boot kernel with basic caches debugging enabled"
+	help
+	  This enables by default sanity_checks, red_zone, poison and store_user
+	  debugging options for all caches.
 
 config KERNEL_SLABINFO
 	select KERNEL_SLUB_DEBUG