---
 mm/Kconfig.debug |   12 ++++++++++++
 mm/vmalloc.c     |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

Index: linux-6.9.0-rc2-rt1/mm/Kconfig.debug
===================================================================
@ linux-6.9.0-rc2-rt1/mm/Kconfig.debug:73 @ config SLUB_DEBUG_ON
 	  off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
 	  "slab_debug=-".
 
+config VMALLOC_DEBUG
+	default y
+	bool "Enable vmalloc debugging support" if EXPERT
+	depends on SYSFS
+	select STACKDEPOT if STACKTRACE_SUPPORT
+	help
+	  Current vmalloc settings and allocations can be inspected through
+	  /proc/vmallocinfo. However, this needs to take long locks which
+	  may create an unacceptable latency on a real-time system.
+
+	  If unsure and CONFIG_PREEMPT_RT is not configured, say Y.
+
 config PAGE_OWNER
 	bool "Track page owner"
 	depends on DEBUG_KERNEL && STACKTRACE_SUPPORT
Index: linux-6.9.0-rc2-rt1/mm/vmalloc.c
===================================================================
--- linux-6.9.0-rc2-rt1.orig/mm/vmalloc.c
+++ linux-6.9.0-rc2-rt1/mm/vmalloc.c
@ linux-6.9.0-rc2-rt1/mm/Kconfig.debug:4803 @ bool vmalloc_dump_obj(void *object)
 }
 #endif
 
-#ifdef CONFIG_PROC_FS
+#if defined(CONFIG_PROC_FS) && defined(VMALLOC_DEBUG)
 static void show_numa_info(struct seq_file *m, struct vm_struct *v)
 {
 	if (IS_ENABLED(CONFIG_NUMA)) {