diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-06-26 17:38:27 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-06-26 17:38:27 +0100 |
commit | 4698c1f2bbe44ce852ef1a6716973c1f5401a4c4 (patch) | |
tree | 9ca3be2353d3757e2926689351eff2bb09aaf6f7 /Documentation | |
parent | bab4a34afc301fdb81b6ea0e3098d96fc356e03a (diff) | |
download | kernel-mfld-blackbay-4698c1f2bbe44ce852ef1a6716973c1f5401a4c4.tar.gz kernel-mfld-blackbay-4698c1f2bbe44ce852ef1a6716973c1f5401a4c4.tar.bz2 kernel-mfld-blackbay-4698c1f2bbe44ce852ef1a6716973c1f5401a4c4.zip |
kmemleak: Do not trigger a scan when reading the debug/kmemleak file
Since there is a kernel thread for automatically scanning the memory, it
makes sense for the debug/kmemleak file to only show its findings. This
patch also adds support for "echo scan > debug/kmemleak" to trigger an
intermediate memory scan and eliminates the kmemleak_mutex (scan_mutex
covers all the cases now).
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kmemleak.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt index c06f7ba6499..89068030b01 100644 --- a/Documentation/kmemleak.txt +++ b/Documentation/kmemleak.txt @@ -17,12 +17,16 @@ Usage CONFIG_DEBUG_KMEMLEAK in "Kernel hacking" has to be enabled. A kernel thread scans the memory every 10 minutes (by default) and prints the -number of new unreferenced objects found. To trigger an intermediate -scan and display the details of all the possible memory leaks: +number of new unreferenced objects found. To display the details of all +the possible memory leaks: # mount -t debugfs nodev /sys/kernel/debug/ # cat /sys/kernel/debug/kmemleak +To trigger an intermediate memory scan: + + # echo scan > /sys/kernel/debug/kmemleak + Note that the orphan objects are listed in the order they were allocated and one object at the beginning of the list may cause other subsequent objects to be reported as orphan. @@ -37,6 +41,7 @@ Memory scanning parameters can be modified at run-time by writing to the scan=off - stop the automatic memory scanning thread scan=<secs> - set the automatic memory scanning period in seconds (default 600, 0 to stop the automatic scanning) + scan - trigger a memory scan Kmemleak can also be disabled at boot-time by passing "kmemleak=off" on the kernel command line. |