linux-stable/Documentation
Li Zefan c89da70c73 kmemleak: allow freeing internal objects after kmemleak was disabled
Currently if kmemleak is disabled, the kmemleak objects can never be
freed, no matter if it's disabled by a user or due to fatal errors.

Those objects can be a big waste of memory.

    OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
  1200264 1197433  99%    0.30K  46164       26    369312K kmemleak_object

With this patch, after kmemleak was disabled you can reclaim memory
with:

	# echo clear > /sys/kernel/debug/kmemleak

Also inform users about this with a printk.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-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>
2014-04-03 16:20:50 -07:00
..
2014-02-10 16:01:40 -08:00
2012-04-03 13:09:18 +02:00
2014-02-10 16:01:40 -08:00
2014-03-21 13:16:58 +01:00
2014-02-28 15:12:08 -08:00
2013-04-02 09:39:55 -07:00
2014-02-10 16:01:40 -08:00
2014-03-21 13:16:58 +01:00
2013-11-27 11:03:38 -08:00
2013-01-10 01:27:46 +01:00
2013-07-25 12:34:15 +02:00
2014-03-21 13:16:58 +01:00
2013-10-16 13:35:02 -07:00
2014-03-21 13:16:58 +01:00
2014-03-21 13:16:58 +01:00
2014-02-18 08:09:40 -08:00
2014-01-16 12:00:57 -08:00
2013-11-14 11:04:40 -08:00
2012-07-29 21:11:05 -03:00
2013-12-02 14:48:28 +01:00
2014-03-21 13:16:58 +01:00
2013-12-02 14:48:28 +01:00
2013-12-02 14:48:28 +01:00
2014-03-21 13:16:58 +01:00
2013-12-02 14:45:19 +01:00
2012-02-28 16:05:06 +01:00
2013-10-24 10:51:33 +02:00
2013-09-05 16:36:21 -06:00
2012-01-02 13:04:55 +01:00