]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lib/show_mem.c: show num_poisoned_pages when oom
authorXishi Qiu <qiuxishi@huawei.com>
Fri, 3 Jan 2014 03:09:57 +0000 (14:09 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:09:57 +0000 (14:09 +1100)
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 <qiuxishi@huawei.com>
Suggested-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/show_mem.c

index f58689f5a24e44b95080569401599012e2853157..09225796991a83a9281194d855719021b8b18282 100644 (file)
@@ -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
 }