linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] mm: add show num_poisoned_pages when oom
@ 2013-12-10  1:38 Xishi Qiu
  2013-12-10 19:56 ` KOSAKI Motohiro
  0 siblings, 1 reply; 2+ messages in thread
From: Xishi Qiu @ 2013-12-10  1:38 UTC (permalink / raw)
  To: Andrew Morton, KOSAKI Motohiro, Michal Hocko, Mel Gorman,
	rientjes, Naoya Horiguchi
  Cc: LKML, linux-mm, Xishi Qiu

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>
---
 lib/show_mem.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/show_mem.c b/lib/show_mem.c
index 5847a49..1cbdcd8 100644
--- a/lib/show_mem.c
+++ b/lib/show_mem.c
@@ -46,4 +46,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
 }
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] mm: add show num_poisoned_pages when oom
  2013-12-10  1:38 [PATCH V2] mm: add show num_poisoned_pages when oom Xishi Qiu
@ 2013-12-10 19:56 ` KOSAKI Motohiro
  0 siblings, 0 replies; 2+ messages in thread
From: KOSAKI Motohiro @ 2013-12-10 19:56 UTC (permalink / raw)
  To: qiuxishi, akpm, mhocko, mgorman, rientjes, n-horiguchi
  Cc: kosaki.motohiro, linux-kernel, linux-mm

(12/9/2013 8:38 PM), Xishi Qiu wrote:
> 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>
> ---
>  lib/show_mem.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/show_mem.c b/lib/show_mem.c
> index 5847a49..1cbdcd8 100644
> --- a/lib/show_mem.c
> +++ b/lib/show_mem.c
> @@ -46,4 +46,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
>  }

Looks ok.

Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-10 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10  1:38 [PATCH V2] mm: add show num_poisoned_pages when oom Xishi Qiu
2013-12-10 19:56 ` KOSAKI Motohiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).