mm: add show num_poisoned_pages when oom
Subsystems (2)
PATCH 1/1 mm: add show num_poisoned_pages when oom
Show num_poisoned_pages when oom, it is helpful to find the reason.
--- lib/show_mem.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
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 poisoned\n" ,atomic_long_read (&num_poisoned_pages)); +#endif }
Signature · 7 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>
Quoted 3 lines · Xishi Qiu
Show
num_poisoned_pageswhen oom, it is helpful to find the reason.Signed-off-by Xishi Qiu <[email protected]>
I would not expect the number of these pages would be too high to matter in real life but having the information cannot be harmful in any way.
Quoted 19 lines
--- lib/show_mem.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)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 poisoned\n" ,atomic_long_read (&num_poisoned_pages)); +#endif }Signature · 1 line
1.7.1
Signature · 8 lines
Michal Hocko SUSE Labs -- 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>
Quoted 3 lines · Xishi Qiu
Show
num_poisoned_pageswhen oom, it is helpful to find the reason.Signed-off-by Xishi Qiu <[email protected]>
Although this patch says it's for oom conditions, it will be emitted anytime show_mem() is called which sounds good as well.
--
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>
Quoted 12 lines · Xishi Qiu
Show
num_poisoned_pageswhen oom, it is helpful to find the reason.Signed-off-by Xishi Qiu <[email protected]>--- lib/show_mem.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)lib/show_mem.c +0
-0
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 poisoned\n" ,atomic_long_read (&num_poisoned_pages)); +#endif }
I think that just "poisoned" could be confusing because this word seems to be used also in other context (like slab and list_debug handling.) "hwpoisoned" or "hardware corrupted" (which is the same label in /proc/meminfo) looks better to me.
Thanks,
Naoya Horiguchi
--
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>
Quoted 16 lines · Naoya Horiguchi
Quoted 16 lines
Show
num_poisoned_pageswhen oom, it is helpful to find the reason.Signed-off-by Xishi Qiu <[email protected]>--- lib/show_mem.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)lib/show_mem.c +1
-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
Quoted 9 lines
lib/show_mem.c void show_mem(unsigned int filter) · line 52
Quoted 3 lines
lib/show_mem.c +2
-0+printk ("%lu pages poisoned\n" ,atomic_long_read (&num_poisoned_pages)); +#endif }I think that just "poisoned" could be confusing because this word seems to be used also in other context (like slab and
list_debughandling.) "hwpoisoned" or "hardware corrupted" (which is the same label in/proc/meminfo) looks better to me.
Ah, good point.
--
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>