summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorWen Congyang <wency@cn.fujitsu.com>2013-02-07 12:26:26 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-02-14 15:25:18 +1100
commitada1abdec7059d900db01574ef2eceaee356ea6f (patch)
tree051b3c03e1ac4058db8b2b2d5f72c45ee6d9a0be /include/linux
parent1e3059b17cc391b88864c75652850e257f5a5700 (diff)
memory-hotplug: common APIs to support page tables hot-remove
When memory is removed, the corresponding pagetables should alse be removed. This patch introduces some common APIs to support vmemmap pagetable and x86_64 architecture pagetable removing. All pages of virtual mapping in removed memory cannot be freed if some pages used as PGD/PUD includes not only removed memory but also other memory. So the patch uses the following way to check whether page can be freed or not. 1. When removing memory, the page structs of the removed memory are filled with 0FD. 2. All page structs are filled with 0xFD on PT/PMD, PT/PMD can be cleared. In this case, the page used as PT/PMD can be freed. Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: Jianguo Wu <wujianguo@huawei.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Jiang Liu <jiang.liu@huawei.com> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Wu Jianguo <wujianguo@huawei.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bootmem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 3cd16ba82f15..cdc3bab01832 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -53,6 +53,7 @@ extern void free_bootmem_node(pg_data_t *pgdat,
unsigned long size);
extern void free_bootmem(unsigned long physaddr, unsigned long size);
extern void free_bootmem_late(unsigned long physaddr, unsigned long size);
+extern void __free_pages_bootmem(struct page *page, unsigned int order);
/*
* Flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE,