Skip to content

Commit

Permalink
lib/show_mem.c: show num_poisoned_pages when oom
Browse files Browse the repository at this point in the history
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 <[email protected]>
Suggested-by: Naoya Horiguchi <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: David Rientjes <[email protected]>
Reviewed-by: Wanpeng Li <[email protected]>
Acked-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Xishi Qiu authored and torvalds committed Jan 22, 2014
1 parent 4883e99 commit 25487d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/show_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 25487d7

Please sign in to comment.