aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2012-07-31 19:42:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 21:42:40 -0400
commit24669e58477e2752c1fbca9c1c988e9dd0d79d15 (patch)
treea4fe04fc1cc2b5a2d89b67f745185b9e9640426f /include
parent972dc4de13f667a7df27ee32573b2e6fc6cc8434 (diff)
hugetlb: use mmu_gather instead of a temporary linked list for accumulating pages
Use a mmu_gather instead of a temporary linked list for accumulating pages when we unmap a hugepage range Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Cc: Hillf Danton <dhillf@gmail.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hugetlb.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 217f52859fa7..0f23c1840c9b 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -7,6 +7,7 @@
7 7
8struct ctl_table; 8struct ctl_table;
9struct user_struct; 9struct user_struct;
10struct mmu_gather;
10 11
11#ifdef CONFIG_HUGETLB_PAGE 12#ifdef CONFIG_HUGETLB_PAGE
12 13
@@ -40,9 +41,10 @@ int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
40 struct page **, struct vm_area_struct **, 41 struct page **, struct vm_area_struct **,
41 unsigned long *, int *, int, unsigned int flags); 42 unsigned long *, int *, int, unsigned int flags);
42void unmap_hugepage_range(struct vm_area_struct *, 43void unmap_hugepage_range(struct vm_area_struct *,
43 unsigned long, unsigned long, struct page *); 44 unsigned long, unsigned long, struct page *);
44void __unmap_hugepage_range(struct vm_area_struct *, 45void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma,
45 unsigned long, unsigned long, struct page *); 46 unsigned long start, unsigned long end,
47 struct page *ref_page);
46int hugetlb_prefault(struct address_space *, struct vm_area_struct *); 48int hugetlb_prefault(struct address_space *, struct vm_area_struct *);
47void hugetlb_report_meminfo(struct seq_file *); 49void hugetlb_report_meminfo(struct seq_file *);
48int hugetlb_report_node_meminfo(int, char *); 50int hugetlb_report_node_meminfo(int, char *);
@@ -98,7 +100,6 @@ static inline unsigned long hugetlb_total_pages(void)
98#define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) 100#define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL)
99#define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) 101#define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; })
100#define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) 102#define hugetlb_prefault(mapping, vma) ({ BUG(); 0; })
101#define unmap_hugepage_range(vma, start, end, page) BUG()
102static inline void hugetlb_report_meminfo(struct seq_file *m) 103static inline void hugetlb_report_meminfo(struct seq_file *m)
103{ 104{
104} 105}
@@ -112,13 +113,24 @@ static inline void hugetlb_report_meminfo(struct seq_file *m)
112#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) 113#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
113#define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) 114#define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; })
114#define huge_pte_offset(mm, address) 0 115#define huge_pte_offset(mm, address) 0
115#define dequeue_hwpoisoned_huge_page(page) 0 116static inline int dequeue_hwpoisoned_huge_page(struct page *page)
117{
118 return 0;
119}
120
116static inline void copy_huge_page(struct page *dst, struct page *src) 121static inline void copy_huge_page(struct page *dst, struct page *src)
117{ 122{
118} 123}
119 124
120#define hugetlb_change_protection(vma, address, end, newprot) 125#define hugetlb_change_protection(vma, address, end, newprot)
121 126
127static inline void __unmap_hugepage_range(struct mmu_gather *tlb,
128 struct vm_area_struct *vma, unsigned long start,
129 unsigned long end, struct page *ref_page)
130{
131 BUG();
132}
133
122#endif /* !CONFIG_HUGETLB_PAGE */ 134#endif /* !CONFIG_HUGETLB_PAGE */
123 135
124#define HUGETLB_ANON_FILE "anon_hugepage" 136#define HUGETLB_ANON_FILE "anon_hugepage"