aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memory_hotplug.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/memory_hotplug.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/memory_hotplug.h')
-rw-r--r--include/linux/memory_hotplug.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 864035fb8f8a..8122018d3000 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -13,12 +13,16 @@ struct mem_section;
13#ifdef CONFIG_MEMORY_HOTPLUG 13#ifdef CONFIG_MEMORY_HOTPLUG
14 14
15/* 15/*
16 * Types for free bootmem. 16 * Types for free bootmem stored in page->lru.next. These have to be in
17 * The normal smallest mapcount is -1. Here is smaller value than it. 17 * some random range in unsigned long space for debugging purposes.
18 */ 18 */
19#define SECTION_INFO (-1 - 1) 19enum {
20#define MIX_SECTION_INFO (-1 - 2) 20 MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE = 12,
21#define NODE_INFO (-1 - 3) 21 SECTION_INFO = MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE,
22 MIX_SECTION_INFO,
23 NODE_INFO,
24 MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE = NODE_INFO,
25};
22 26
23/* 27/*
24 * pgdat resizing functions 28 * pgdat resizing functions
@@ -70,6 +74,10 @@ extern void online_page(struct page *page);
70extern int online_pages(unsigned long, unsigned long); 74extern int online_pages(unsigned long, unsigned long);
71extern void __offline_isolated_pages(unsigned long, unsigned long); 75extern void __offline_isolated_pages(unsigned long, unsigned long);
72 76
77#ifdef CONFIG_MEMORY_HOTREMOVE
78extern bool is_pageblock_removable_nolock(struct page *page);
79#endif /* CONFIG_MEMORY_HOTREMOVE */
80
73/* reasonably generic interface to expand the physical pages in a zone */ 81/* reasonably generic interface to expand the physical pages in a zone */
74extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, 82extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn,
75 unsigned long nr_pages); 83 unsigned long nr_pages);
@@ -157,6 +165,15 @@ extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
157extern void put_page_bootmem(struct page *page); 165extern void put_page_bootmem(struct page *page);
158#endif 166#endif
159 167
168/*
169 * Lock for memory hotplug guarantees 1) all callbacks for memory hotplug
170 * notifier will be called under this. 2) offline/online/add/remove memory
171 * will not run simultaneously.
172 */
173
174void lock_memory_hotplug(void);
175void unlock_memory_hotplug(void);
176
160#else /* ! CONFIG_MEMORY_HOTPLUG */ 177#else /* ! CONFIG_MEMORY_HOTPLUG */
161/* 178/*
162 * Stub functions for when hotplug is off 179 * Stub functions for when hotplug is off
@@ -188,6 +205,9 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
188{ 205{
189} 206}
190 207
208static inline void lock_memory_hotplug(void) {}
209static inline void unlock_memory_hotplug(void) {}
210
191#endif /* ! CONFIG_MEMORY_HOTPLUG */ 211#endif /* ! CONFIG_MEMORY_HOTPLUG */
192 212
193#ifdef CONFIG_MEMORY_HOTREMOVE 213#ifdef CONFIG_MEMORY_HOTREMOVE