diff options
author | Sri Krishna chowdary <schowdary@nvidia.com> | 2018-12-28 03:38:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 15:11:51 -0500 |
commit | d53ce042277a94eadf9a8a31fc41fac54c67dec5 (patch) | |
tree | 3da438e716f60f459fead3af0ef0279ad80778c2 /lib | |
parent | 3c0c12cc8f00ca5f81acb010023b8eb13e9a7004 (diff) |
kmemleak: add config to select auto scan
Kmemleak scan can be cpu intensive and can stall user tasks at times. To
prevent this, add config DEBUG_KMEMLEAK_AUTO_SCAN to enable/disable auto
scan on boot up. Also protect first_run with DEBUG_KMEMLEAK_AUTO_SCAN as
this is meant for only first automatic scan.
Link: http://lkml.kernel.org/r/1540231723-7087-1-git-send-email-prpatel@nvidia.com
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Signed-off-by: Prateek <prpatel@nvidia.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b3c91b9e32f8..2b5a4256e88b 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -593,6 +593,21 @@ config DEBUG_KMEMLEAK_DEFAULT_OFF | |||
593 | Say Y here to disable kmemleak by default. It can then be enabled | 593 | Say Y here to disable kmemleak by default. It can then be enabled |
594 | on the command line via kmemleak=on. | 594 | on the command line via kmemleak=on. |
595 | 595 | ||
596 | config DEBUG_KMEMLEAK_AUTO_SCAN | ||
597 | bool "Enable kmemleak auto scan thread on boot up" | ||
598 | default y | ||
599 | depends on DEBUG_KMEMLEAK | ||
600 | help | ||
601 | Depending on the cpu, kmemleak scan may be cpu intensive and can | ||
602 | stall user tasks at times. This option enables/disables automatic | ||
603 | kmemleak scan at boot up. | ||
604 | |||
605 | Say N here to disable kmemleak auto scan thread to stop automatic | ||
606 | scanning. Disabling this option disables automatic reporting of | ||
607 | memory leaks. | ||
608 | |||
609 | If unsure, say Y. | ||
610 | |||
596 | config DEBUG_STACK_USAGE | 611 | config DEBUG_STACK_USAGE |
597 | bool "Stack utilization instrumentation" | 612 | bool "Stack utilization instrumentation" |
598 | depends on DEBUG_KERNEL && !IA64 | 613 | depends on DEBUG_KERNEL && !IA64 |