lkml.org 
[lkml]   [2012]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/4] memory-hotplug: auto offline page_cgroup when onlining memory block failed
    Date
    From: Wen Congyang <wency@cn.fujitsu.com>

    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 <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/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:
    --
    1.7.1


    \
     
     \ /
      Last update: 2012-09-27 08:01    [W:4.333 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site