From 52f238653e452e0fda61e880f263a173d219acd1 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Mon, 27 Feb 2023 09:36:27 -0800 Subject: mm: introduce per-VMA lock statistics Add a new CONFIG_PER_VMA_LOCK_STATS config option to dump extra statistics about handling page fault under VMA lock. Link: https://lkml.kernel.org/r/20230227173632.3292573-29-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton --- mm/Kconfig.debug | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mm/Kconfig.debug') diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index c3547a373c9c..4965a7333a3f 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -279,3 +279,9 @@ config DEBUG_KMEMLEAK_AUTO_SCAN If unsure, say Y. +config PER_VMA_LOCK_STATS + bool "Statistics for per-vma locks" + depends on PER_VMA_LOCK + default y + help + Statistics for per-vma locks. -- cgit v1.2.3 From 27d9a0fdb53f05c93ed9c674b870c8add451697e Mon Sep 17 00:00:00 2001 From: Hao Ge Date: Thu, 30 Mar 2023 14:09:04 +0800 Subject: kmemleak-test: fix kmemleak_test.c build logic kmemleak-test.c was moved to the samples directory in 1abbef4f51724 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir"). If CONFIG_DEBUG_KMEMLEAK_TEST=m and CONFIG_SAMPLES is unset, kmemleak-test.c will be unnecessarily compiled. So move the entry for CONFIG_DEBUG_KMEMLEAK_TEST from mm/Kconfig and add a new CONFIG_SAMPLE_KMEMLEAK in samples/ to control whether kmemleak-test.c is built or not. Link: https://lkml.kernel.org/r/20230330060904.292975-1-gehao@kylinos.cn Fixes: 1abbef4f51724 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir") Signed-off-by: Hao Ge Cc: Catalin Marinas Cc: Alex Gaynor Cc: Alex Williamson Cc: Arnd Bergmann Cc: Finn Behrens Cc: Greg Kroah-Hartman Cc: Jason Gunthorpe Cc: Mark Rutland Cc: Miguel Ojeda Cc: Tony Krowiak Cc: Ye Xingchen Signed-off-by: Andrew Morton --- mm/Kconfig.debug | 8 -------- 1 file changed, 8 deletions(-) (limited to 'mm/Kconfig.debug') diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index 4965a7333a3f..065ed0d687cb 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -249,14 +249,6 @@ config DEBUG_KMEMLEAK_MEM_POOL_SIZE fully initialised, this memory pool acts as an emergency one if slab allocations fail. -config DEBUG_KMEMLEAK_TEST - tristate "Simple test for the kernel memory leak detector" - depends on DEBUG_KMEMLEAK && m - help - This option enables a module that explicitly leaks memory. - - If unsure, say N. - config DEBUG_KMEMLEAK_DEFAULT_OFF bool "Default kmemleak to off" depends on DEBUG_KMEMLEAK -- cgit v1.2.3