[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1351682594-17347-3-git-send-email-wency@cn.fujitsu.com>
Date: Wed, 31 Oct 2012 19:23:08 +0800
From: Wen Congyang <wency@...fujitsu.com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org
Cc: Jiang Liu <liuj97@...il.com>, Len Brown <len.brown@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
rjw@...k.pl, Lai Jiangshan <laijs@...fujitsu.com>,
Wen Congyang <wency@...fujitsu.com>,
David Rientjes <rientjes@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Christoph Lameter <cl@...ux.com>,
Minchan Kim <minchan.kim@...il.com>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Mel Gorman <mel@....ul.ie>
Subject: [Patch v4 2/8] memory-hotplug: auto offline page_cgroup when onlining memory block failed
When a memory block is onlined, we will try allocate memory on that node
to store page_cgroup. If onlining the memory block failed, we don't
offline the page cgroup, and we have no chance to offline this page cgroup
unless the memory block is onlined successfully again. It will cause that
we can't hot-remove the memory device on that node, because some memory is
used to store page cgroup. If onlining the memory block is failed, there
is no need to stort page cgroup for this memory. So auto offline
page_cgroup when onlining memory block failed.
Signed-off-by: Wen Congyang <wency@...fujitsu.com>
Cc: David Rientjes <rientjes@...gle.com>
Cc: Jiang Liu <liuj97@...il.com>
Cc: Len Brown <len.brown@...el.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Christoph Lameter <cl@...ux.com>
Cc: Minchan Kim <minchan.kim@...il.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
Cc: Dave Hansen <dave@...ux.vnet.ibm.com>
Cc: Mel Gorman <mel@....ul.ie>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
mm/page_cgroup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 5ddad0c..44db00e 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -251,6 +251,9 @@ static int __meminit page_cgroup_callback(struct notifier_block *self,
mn->nr_pages, mn->status_change_nid);
break;
case MEM_CANCEL_ONLINE:
+ offline_page_cgroup(mn->start_pfn,
+ mn->nr_pages, mn->status_change_nid);
+ break;
case MEM_GOING_OFFLINE:
break;
case MEM_ONLINE:
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists