diff options
author | Christoph Lameter <clameter@engr.sgi.com> | 2006-01-06 03:10:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:23 -0500 |
commit | 5da7ca86078964cbfe6c83efc1205904587706fe (patch) | |
tree | a64a7824e90b42d6fdd71e6cb652362beb8983a1 /include/linux/mempolicy.h | |
parent | 96df9333c94d7d5aeceb21f6c5e7ae8ff34753cf (diff) |
[PATCH] Add NUMA policy support for huge pages.
The huge_zonelist() function in the memory policy layer provides an list of
zones ordered by NUMA distance. The hugetlb layer will walk that list looking
for a zone that has available huge pages but is also in the nodeset of the
current cpuset.
This patch does not contain the folding of find_or_alloc_huge_page() that was
controversial in the earlier discussion.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@muc.de>
Acked-by: William Lee Irwin III <wli@holomorphy.com>
Cc: Adam Litke <agl@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mempolicy.h')
-rw-r--r-- | include/linux/mempolicy.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 8b67cf837ca9..817db6427113 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -156,6 +156,8 @@ extern void numa_default_policy(void); | |||
156 | extern void numa_policy_init(void); | 156 | extern void numa_policy_init(void); |
157 | extern void numa_policy_rebind(const nodemask_t *old, const nodemask_t *new); | 157 | extern void numa_policy_rebind(const nodemask_t *old, const nodemask_t *new); |
158 | extern struct mempolicy default_policy; | 158 | extern struct mempolicy default_policy; |
159 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, | ||
160 | unsigned long addr); | ||
159 | 161 | ||
160 | #else | 162 | #else |
161 | 163 | ||
@@ -232,6 +234,12 @@ static inline void numa_policy_rebind(const nodemask_t *old, | |||
232 | { | 234 | { |
233 | } | 235 | } |
234 | 236 | ||
237 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, | ||
238 | unsigned long addr) | ||
239 | { | ||
240 | return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER); | ||
241 | } | ||
242 | |||
235 | #endif /* CONFIG_NUMA */ | 243 | #endif /* CONFIG_NUMA */ |
236 | #endif /* __KERNEL__ */ | 244 | #endif /* __KERNEL__ */ |
237 | 245 | ||