lkml.org 
[lkml]   [2013]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] mem-hotplug: Do not free LOCAL_NODE_DATA pages to buddy system in hot-remove procedure.
Date
In memory hot-remove procedure, we free pagetable pages to buddy system.
But for local pagetable pages, do not free them to buddy system because
they were skipped in offline procedure. The memory block they reside in
could have been offlined, and we won't offline it again.

Signed-off-by: Tang Chen <tangchen@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 21d6fcb..c30e819 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -119,6 +119,14 @@ void __ref put_page_bootmem(struct page *page)
INIT_LIST_HEAD(&page->lru);

/*
+ * Do not free pages with local node kernel data (for now, just
+ * local pagetables) to the buddy system because we skipped
+ * these pages when offlining the corresponding block.
+ */
+ if (type == LOCAL_NODE_DATA)
+ return;
+
+ /*
* Please refer to comment for __free_pages_bootmem()
* for why we serialize here.
*/
--
1.7.1


\
 
 \ /
  Last update: 2013-05-24 12:21    [W:0.072 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site