Skip to contentSkip to conversation

mm: add show num_poisoned_pages when oom

PATCH In review Xishi Qiu 3 participants 3 messages Dec 10, 2013

Subsystems (2)
lore
Share & tools
lore

Xishi Qiu

author
#0 lore raw

PATCH v2 1/1 mm: add 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.

---
 lib/show_mem.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
lib/show_mem.c +3 -0
index 5847a49..1cbdcd8 100644
@@ -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
 }
Signature · 8 lines
1.7.1


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · 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.

Quoted 25 lines

---
lib/show_mem.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
lib/show_mem.c +3 -0
index 5847a49..1cbdcd8 100644
@@ -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
 }
Signature · 8 lines
1.7.1


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by on v2 1/1
#2 lore raw
In reply to Xishi Qiu
Quoted 16 lines · 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.

---
 lib/show_mem.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
lib/show_mem.c +0 -0
index 5847a49..1cbdcd8 100644

lib/show_mem.c void show_mem(unsigned int filter) · line 52

Quoted 7 lines
lib/show_mem.c +3 -0
@@ -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.