diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2013-09-11 17:22:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:57:48 -0400 |
commit | 74060e4d78795c7c43805133cb717d82533d4e0d (patch) | |
tree | 923febdc5b4565fbbcf05387d7cc423c72648695 /include/linux | |
parent | e632a938d914d271bec26e570d36c755a1e35e4c (diff) |
mm: mbind: add hugepage migration code to mbind()
Extend do_mbind() to handle vma with VM_HUGETLB set. We will be able to
migrate hugepage with mbind(2) after applying the enablement patch which
comes later in this series.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Acked-by: Hillf Danton <dhillf@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Rik van Riel <riel@redhat.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hugetlb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index bc8d8370cd0d..d1db00790a84 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -265,6 +265,8 @@ struct huge_bootmem_page { | |||
265 | }; | 265 | }; |
266 | 266 | ||
267 | struct page *alloc_huge_page_node(struct hstate *h, int nid); | 267 | struct page *alloc_huge_page_node(struct hstate *h, int nid); |
268 | struct page *alloc_huge_page_noerr(struct vm_area_struct *vma, | ||
269 | unsigned long addr, int avoid_reserve); | ||
268 | 270 | ||
269 | /* arch callback */ | 271 | /* arch callback */ |
270 | int __init alloc_bootmem_huge_page(struct hstate *h); | 272 | int __init alloc_bootmem_huge_page(struct hstate *h); |
@@ -378,6 +380,7 @@ static inline pgoff_t basepage_index(struct page *page) | |||
378 | #else /* CONFIG_HUGETLB_PAGE */ | 380 | #else /* CONFIG_HUGETLB_PAGE */ |
379 | struct hstate {}; | 381 | struct hstate {}; |
380 | #define alloc_huge_page_node(h, nid) NULL | 382 | #define alloc_huge_page_node(h, nid) NULL |
383 | #define alloc_huge_page_noerr(v, a, r) NULL | ||
381 | #define alloc_bootmem_huge_page(h) NULL | 384 | #define alloc_bootmem_huge_page(h) NULL |
382 | #define hstate_file(f) NULL | 385 | #define hstate_file(f) NULL |
383 | #define hstate_sizelog(s) NULL | 386 | #define hstate_sizelog(s) NULL |