From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx201.postini.com [74.125.245.201]) by kanga.kvack.org (Postfix) with SMTP id 1BE456B005A for ; Wed, 17 Oct 2012 11:26:40 -0400 (EDT) Received: by mail-pa0-f41.google.com with SMTP id fa10so8229581pad.14 for ; Wed, 17 Oct 2012 08:26:39 -0700 (PDT) Message-ID: <507ECE16.7030107@gmail.com> Date: Wed, 17 Oct 2012 23:26:14 +0800 From: Wen Congyang MIME-Version: 1.0 Subject: Re: [PATCH v2 3/5] memory-hotplug: auto offline page_cgroup when onlining memory block failed References: <1350475735-26136-1-git-send-email-wency@cn.fujitsu.com> <1350475735-26136-4-git-send-email-wency@cn.fujitsu.com> In-Reply-To: <1350475735-26136-4-git-send-email-wency@cn.fujitsu.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: 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, Christoph Lameter At 2012/10/17 20:08, wency@cn.fujitsu.com Wrote: > From: Wen Congyang > > 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. > > CC: David Rientjes > CC: Jiang Liu > CC: Len Brown > CC: Benjamin Herrenschmidt > CC: Paul Mackerras > CC: Christoph Lameter > Cc: Minchan Kim > CC: Andrew Morton > CC: KOSAKI Motohiro > CC: Yasuaki Ishimatsu > Signed-off-by: Wen Congyang This patch has been acked by kosaki. I forgot to add "Acked-by: KOSAKI Motohiro " > --- > mm/page_cgroup.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > 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: -- 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: email@kvack.org