From: Ni zhan Chen <nizhan.chen@gmail.com>
To: wency@cn.fujitsu.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
rientjes@google.com, liuj97@gmail.com, len.brown@intel.com,
benh@kernel.crashing.org, paulus@samba.org,
minchan.kim@gmail.com, akpm@linux-foundation.org,
kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com
Subject: Re: [PATCH 3/4] memory-hotplug: clear hwpoisoned flag when onlining pages
Date: Thu, 27 Sep 2012 20:27:37 +0800 [thread overview]
Message-ID: <50644639.9000804@gmail.com> (raw)
In-Reply-To: <1348724705-23779-4-git-send-email-wency@cn.fujitsu.com>
On 09/27/2012 01:45 PM, wency@cn.fujitsu.com wrote:
> From: Wen Congyang <wency@cn.fujitsu.com>
>
> hwpoisoned may set when we offline a page by the sysfs interface
> /sys/devices/system/memory/soft_offline_page or
> /sys/devices/system/memory/hard_offline_page. 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.
page hwpoisoned maybe cause by a multi-bit ECC memory or cache failure,
so this page should not be used, why you online and free it again? can
any users use it?
>
> CC: David Rientjes <rientjes@google.com>
> CC: Jiang Liu <liuj97@gmail.com>
> CC: Len Brown <len.brown@intel.com>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: Paul Mackerras <paulus@samba.org>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> CC: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
> mm/memory_hotplug.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 6a5b90d..9a5b10f 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -431,6 +431,14 @@ EXPORT_SYMBOL_GPL(__online_page_increment_counters);
>
> void __online_page_free(struct page *page)
> {
> +#ifdef CONFIG_MEMORY_FAILURE
> + /* The page may be marked HWPoisoned by soft/hard offline page */
> + if (PageHWPoison(page)) {
> + atomic_long_sub(1, &mce_bad_pages);
> + ClearPageHWPoison(page);
> + }
> +#endif
> +
> ClearPageReserved(page);
> init_page_count(page);
> __free_page(page);
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Ni zhan Chen <nizhan.chen@gmail.com>
To: wency@cn.fujitsu.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
rientjes@google.com, liuj97@gmail.com, len.brown@intel.com,
benh@kernel.crashing.org, paulus@samba.org,
minchan.kim@gmail.com, akpm@linux-foundation.org,
kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com
Subject: Re: [PATCH 3/4] memory-hotplug: clear hwpoisoned flag when onlining pages
Date: Thu, 27 Sep 2012 20:27:37 +0800 [thread overview]
Message-ID: <50644639.9000804@gmail.com> (raw)
In-Reply-To: <1348724705-23779-4-git-send-email-wency@cn.fujitsu.com>
On 09/27/2012 01:45 PM, wency@cn.fujitsu.com wrote:
> From: Wen Congyang <wency@cn.fujitsu.com>
>
> hwpoisoned may set when we offline a page by the sysfs interface
> /sys/devices/system/memory/soft_offline_page or
> /sys/devices/system/memory/hard_offline_page. 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.
page hwpoisoned maybe cause by a multi-bit ECC memory or cache failure,
so this page should not be used, why you online and free it again? can
any users use it?
>
> CC: David Rientjes <rientjes@google.com>
> CC: Jiang Liu <liuj97@gmail.com>
> CC: Len Brown <len.brown@intel.com>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: Paul Mackerras <paulus@samba.org>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> CC: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
> mm/memory_hotplug.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 6a5b90d..9a5b10f 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -431,6 +431,14 @@ EXPORT_SYMBOL_GPL(__online_page_increment_counters);
>
> void __online_page_free(struct page *page)
> {
> +#ifdef CONFIG_MEMORY_FAILURE
> + /* The page may be marked HWPoisoned by soft/hard offline page */
> + if (PageHWPoison(page)) {
> + atomic_long_sub(1, &mce_bad_pages);
> + ClearPageHWPoison(page);
> + }
> +#endif
> +
> ClearPageReserved(page);
> init_page_count(page);
> __free_page(page);
next prev parent reply other threads:[~2012-09-27 12:28 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 5:45 [PATCH 0/4] bugfix for memory hotplug wency
2012-09-27 5:45 ` wency
2012-09-27 5:45 ` [PATCH 1/4] memory-hotplug: add memory_block_release wency
2012-09-27 5:45 ` wency
2012-09-27 10:20 ` Ni zhan Chen
2012-09-28 0:24 ` Yasuaki Ishimatsu
2012-09-28 0:24 ` Yasuaki Ishimatsu
2012-09-28 1:35 ` KOSAKI Motohiro
2012-09-28 1:35 ` KOSAKI Motohiro
2012-09-28 3:45 ` Yasuaki Ishimatsu
2012-09-28 3:45 ` Yasuaki Ishimatsu
2012-09-28 6:04 ` Ni zhan Chen
2012-09-28 6:04 ` Ni zhan Chen
2012-09-28 6:11 ` Yasuaki Ishimatsu
2012-09-28 6:11 ` Yasuaki Ishimatsu
2012-09-28 6:14 ` Ni zhan Chen
2012-09-28 6:14 ` Ni zhan Chen
2012-09-28 22:30 ` KOSAKI Motohiro
2012-09-28 22:30 ` KOSAKI Motohiro
2012-09-27 20:11 ` KOSAKI Motohiro
2012-09-27 20:11 ` KOSAKI Motohiro
2012-09-27 5:45 ` [PATCH 2/4] memory-hotplug: add node_device_release wency
2012-09-27 5:45 ` wency
2012-09-27 10:38 ` Ni zhan Chen
2012-09-27 10:38 ` Ni zhan Chen
2012-09-27 20:13 ` KOSAKI Motohiro
2012-09-27 20:13 ` KOSAKI Motohiro
2012-09-28 0:07 ` Yasuaki Ishimatsu
2012-09-28 0:07 ` Yasuaki Ishimatsu
2012-09-28 1:13 ` KOSAKI Motohiro
2012-09-28 1:13 ` KOSAKI Motohiro
2012-09-28 1:30 ` Yasuaki Ishimatsu
2012-09-28 1:30 ` Yasuaki Ishimatsu
2012-09-28 1:37 ` KOSAKI Motohiro
2012-09-28 1:37 ` KOSAKI Motohiro
2012-09-28 9:55 ` Yasuaki Ishimatsu
2012-09-28 9:55 ` Yasuaki Ishimatsu
2012-09-28 22:19 ` KOSAKI Motohiro
2012-09-28 22:19 ` KOSAKI Motohiro
2012-10-01 6:54 ` Yasuaki Ishimatsu
2012-10-01 6:54 ` Yasuaki Ishimatsu
2012-10-01 18:12 ` KOSAKI Motohiro
2012-10-01 18:12 ` KOSAKI Motohiro
2012-10-05 1:00 ` Yasuaki Ishimatsu
2012-10-05 1:00 ` Yasuaki Ishimatsu
2012-10-05 18:39 ` KOSAKI Motohiro
2012-10-05 18:39 ` KOSAKI Motohiro
2012-09-27 5:45 ` [PATCH 3/4] memory-hotplug: clear hwpoisoned flag when onlining pages wency
2012-09-27 5:45 ` wency
2012-09-27 12:27 ` Ni zhan Chen [this message]
2012-09-27 12:27 ` Ni zhan Chen
2012-09-27 20:17 ` KOSAKI Motohiro
2012-09-27 20:17 ` KOSAKI Motohiro
2012-09-28 1:53 ` Wen Congyang
2012-09-28 1:53 ` Wen Congyang
2012-09-27 5:45 ` [PATCH 4/4] memory-hotplug: auto offline page_cgroup when onlining memory block failed wency
2012-09-27 5:45 ` wency
2012-09-27 12:44 ` Ni zhan Chen
2012-09-27 12:44 ` Ni zhan Chen
2012-09-27 20:19 ` KOSAKI Motohiro
2012-09-27 20:19 ` KOSAKI Motohiro
2012-09-27 21:18 ` [PATCH 0/4] bugfix for memory hotplug Andrew Morton
2012-09-27 21:18 ` Andrew Morton
2012-09-29 2:31 ` Ni zhan Chen
2012-09-29 2:31 ` Ni zhan Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50644639.9000804@gmail.com \
--to=nizhan.chen@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuj97@gmail.com \
--cc=minchan.kim@gmail.com \
--cc=paulus@samba.org \
--cc=rientjes@google.com \
--cc=wency@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.