diff options
author | Lee Schermerhorn <lee.schermerhorn@hp.com> | 2009-09-21 20:01:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:26 -0400 |
commit | e8c5c8249878fb6564125680a1d15e06adbd5639 (patch) | |
tree | 66a69c11ea0f27e45c747e6f7236da80d9788cc1 /include/linux/hugetlb.h | |
parent | 55a4462af5722d2814858bc51ee8d58ca29544ab (diff) |
hugetlb: balance freeing of huge pages across nodes
Free huges pages from nodes in round robin fashion in an attempt to keep
[persistent a.k.a static] hugepages balanced across nodes
New function free_pool_huge_page() is modeled on and performs roughly the
inverse of alloc_fresh_huge_page(). Replaces dequeue_huge_page() which
now has no callers, so this patch removes it.
Helper function hstate_next_node_to_free() uses new hstate member
next_to_free_nid to distribute "frees" across all nodes with huge pages.
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Eric Whitney <eric.whitney@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 5cbc620bdfe0..16cdb75a543a 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -185,7 +185,8 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
185 | #define HSTATE_NAME_LEN 32 | 185 | #define HSTATE_NAME_LEN 32 |
186 | /* Defines one hugetlb page size */ | 186 | /* Defines one hugetlb page size */ |
187 | struct hstate { | 187 | struct hstate { |
188 | int hugetlb_next_nid; | 188 | int next_nid_to_alloc; |
189 | int next_nid_to_free; | ||
189 | unsigned int order; | 190 | unsigned int order; |
190 | unsigned long mask; | 191 | unsigned long mask; |
191 | unsigned long max_huge_pages; | 192 | unsigned long max_huge_pages; |