linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 0/3] MCE: fix an error of mce_bad_pages statistics
@ 2012-12-12  3:35 Xishi Qiu
  2012-12-14  2:14 ` [PATCH V4 0/3 RESEND] " Xishi Qiu
  0 siblings, 1 reply; 2+ messages in thread
From: Xishi Qiu @ 2012-12-12  3:35 UTC (permalink / raw)
  To: WuJianguo, Xishi Qiu, Liujiang, Simon Jeons, Andrew Morton,
	Borislav Petkov, Andi Kleen, Fengguang Wu, Wanpeng Li, linux-mm,
	linux-kernel

When we use "/sys/devices/system/memory/soft_offline_page" to offline a
*free* page, the value of mce_bad_pages will be added, and the page is set
HWPoison flag, but it is still managed by page buddy alocator.

$ cat /proc/meminfo | grep HardwareCorrupted shows the value.

If we offline the same page, the value of mce_bad_pages will be added
*again*, this means the value is incorrect now. Assume the page is
still free during this short time.

soft_offline_page()
	get_any_page()
		"else if (is_free_buddy_page(p))" branch return 0
			"goto done";
				"atomic_long_add(1, &mce_bad_pages);"

Changelog:
V4:
	-use num_poisoned_pages instead of mce_bad_pages
	-remove page lock
V3:
	-add page lock when set HWPoison flag
	-adjust the function structure
V2 and V1:
	-fix the error

Xishi Qiu (3):
  move-poisoned-page-check-at-the-beginning-of-the-function
  fix-function-structure
  use-num_poisoned_pages-instead-of-mce_bad_pages

 fs/proc/meminfo.c   |    2 +-
 include/linux/mm.h  |    2 +-
 mm/memory-failure.c |   76 ++++++++++++++++++++++++++-------------------------
 3 files changed, 41 insertions(+), 39 deletions(-)

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

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

* [PATCH V4 0/3 RESEND] MCE: fix an error of mce_bad_pages statistics
  2012-12-12  3:35 [PATCH V4 0/3] MCE: fix an error of mce_bad_pages statistics Xishi Qiu
@ 2012-12-14  2:14 ` Xishi Qiu
  0 siblings, 0 replies; 2+ messages in thread
From: Xishi Qiu @ 2012-12-14  2:14 UTC (permalink / raw)
  To: Xishi Qiu, WuJianguo, Liujiang, Simon Jeons, Andrew Morton,
	Borislav Petkov, Andi Kleen, Fengguang Wu, Wanpeng Li,
	n-horiguchi, linux-mm, linux-kernel

$ echo paddr > /sys/devices/system/memory/soft_offline_page to offline a
*free* page, the value of mce_bad_pages will be added, and the page is set
HWPoison flag, but it is still managed by page buddy alocator.

$ cat /proc/meminfo | grep HardwareCorrupted shows the value.

If we offline the same page, the value of mce_bad_pages will be added
*again*, this means the value is incorrect now. Assume the page is
still free during this short time.

soft_offline_page()
	get_any_page()
		"else if (is_free_buddy_page(p))" branch return 0
			"goto done";
				"atomic_long_add(1, &mce_bad_pages);"

Changelog:
V4:
	-use num_poisoned_pages instead of mce_bad_pages
	-remove page lock
V3:
	-add page lock when set HWPoison flag
	-adjust the function structure
V2 and V1:
	-fix the error

Xishi Qiu (3):
  move-poisoned-page-check-at-the-beginning-of-the-function
  fix-function-structure
  use-num_poisoned_pages-instead-of-mce_bad_pages

 fs/proc/meminfo.c   |    2 +-
 include/linux/mm.h  |    2 +-
 mm/memory-failure.c |   76 ++++++++++++++++++++++++++-------------------------
 3 files changed, 41 insertions(+), 39 deletions(-)


.


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

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

end of thread, other threads:[~2012-12-14  2:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-12  3:35 [PATCH V4 0/3] MCE: fix an error of mce_bad_pages statistics Xishi Qiu
2012-12-14  2:14 ` [PATCH V4 0/3 RESEND] " Xishi Qiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox