From: Xishi Qiu Date: Tue, 21 Jan 2014 23:50:57 +0000 (-0800) Subject: lib/show_mem.c: show num_poisoned_pages when oom X-Git-Tag: v3.14-rc1~134^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25487d73a9670d911530eee2e31c20889ba117db;p=platform%2Fkernel%2Flinux-stable.git lib/show_mem.c: show num_poisoned_pages when oom Show num_poisoned_pages when oom, it is a little helpful to find the reason. Also it will be emitted anytime show_mem() is called. Signed-off-by: Xishi Qiu Suggested-by: Naoya Horiguchi Acked-by: Michal Hocko Acked-by: David Rientjes Reviewed-by: Wanpeng Li Acked-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/show_mem.c b/lib/show_mem.c index f58689f..0922579 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c @@ -43,4 +43,7 @@ void show_mem(unsigned int filter) printk("%lu pages in pagetable cache\n", quicklist_total_size()); #endif +#ifdef CONFIG_MEMORY_FAILURE + printk("%lu pages hwpoisoned\n", atomic_long_read(&num_poisoned_pages)); +#endif }