Re: [RFC v9 PATCH 20/21] memory-hotplug: clear hwpoisoned flag when onlining pages
From: Wen Congyang <hidden>
Date: 2012-09-06 08:36:29
Also in:
linux-acpi, linux-mm, linux-s390, linux-sh, lkml, sparclinux
At 09/06/2012 03:27 PM, andywu106=E5=BB=BA=E5=9B=BD Wrote:
2012/9/5 [off-list ref]quoted
From: Wen Congyang <redacted> hwpoisoned may set when we offline a page by the sysfs interface /sys/devices/system/memory/soft=5Foffline=5Fpage or /sys/devices/system/memory/hard=5Foffline=5Fpage. If we don't clear this flag when onlining pages, this page can't be freed, and will not in free list. So we can't offline these pages again. So we should clear this flag when onlining pages. CC: David Rientjes <rientjes@google.com> CC: Jiang Liu <redacted> CC: Len Brown <redacted> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Paul Mackerras <redacted> CC: Christoph Lameter <redacted> Cc: Minchan Kim <redacted> CC: Andrew Morton <akpm@linux-foundation.org> CC: KOSAKI Motohiro <redacted> CC: Yasuaki Ishimatsu <redacted> Signed-off-by: Wen Congyang <redacted> --- mm/memory=5Fhotplug.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)diff --git a/mm/memory=5Fhotplug.c b/mm/memory=5Fhotplug.c index 270c249..140c080 100644 --- a/mm/memory=5Fhotplug.c +++ b/mm/memory=5Fhotplug.c@@ -661,6 +661,11 @@ EXPORT=5FSYMBOL=5FGPL(=5F=5Fonline=5Fpage=5Fincreme=
nt=5Fcounters);
quoted
void =5F=5Fonline=5Fpage=5Ffree(struct page *page) { +#ifdef CONFIG=5FMEMORY=5FFAILURE + /* The page may be marked HWPoisoned by soft/hard offline page */ + ClearPageHWPoison(page);=20 Hi Congyang, I think you should decrease mce=5Fbad=5Fpages counter her atomic=5Flong=5Fsub(1, &mce=5Fbad=5Fpages);
Yes, thanks for pointing it out. Thanks Wen Congyang
=20quoted
+#endif + ClearPageReserved(page); init=5Fpage=5Fcount(page); =5F=5Ffree=5Fpage(page); -- 1.7.1 -- 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=3Dmailto:"dont@kvack.org"> email@kvack.org </a>=20
=