aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hugetlb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r--include/linux/hugetlb.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 7b5785032049..205026175c42 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -22,7 +22,13 @@ struct mmu_gather;
22struct hugepage_subpool { 22struct hugepage_subpool {
23 spinlock_t lock; 23 spinlock_t lock;
24 long count; 24 long count;
25 long max_hpages, used_hpages; 25 long max_hpages; /* Maximum huge pages or -1 if no maximum. */
26 long used_hpages; /* Used count against maximum, includes */
27 /* both alloced and reserved pages. */
28 struct hstate *hstate;
29 long min_hpages; /* Minimum huge pages or -1 if no minimum. */
30 long rsv_hpages; /* Pages reserved against global pool to */
31 /* sasitfy minimum size. */
26}; 32};
27 33
28struct resv_map { 34struct resv_map {
@@ -38,11 +44,10 @@ extern int hugetlb_max_hstate __read_mostly;
38#define for_each_hstate(h) \ 44#define for_each_hstate(h) \
39 for ((h) = hstates; (h) < &hstates[hugetlb_max_hstate]; (h)++) 45 for ((h) = hstates; (h) < &hstates[hugetlb_max_hstate]; (h)++)
40 46
41struct hugepage_subpool *hugepage_new_subpool(long nr_blocks); 47struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages,
48 long min_hpages);
42void hugepage_put_subpool(struct hugepage_subpool *spool); 49void hugepage_put_subpool(struct hugepage_subpool *spool);
43 50
44int PageHuge(struct page *page);
45
46void reset_vma_resv_huge_pages(struct vm_area_struct *vma); 51void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
47int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); 52int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
48int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); 53int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
@@ -79,7 +84,6 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed);
79int dequeue_hwpoisoned_huge_page(struct page *page); 84int dequeue_hwpoisoned_huge_page(struct page *page);
80bool isolate_huge_page(struct page *page, struct list_head *list); 85bool isolate_huge_page(struct page *page, struct list_head *list);
81void putback_active_hugepage(struct page *page); 86void putback_active_hugepage(struct page *page);
82bool is_hugepage_active(struct page *page);
83void free_huge_page(struct page *page); 87void free_huge_page(struct page *page);
84 88
85#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE 89#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
@@ -109,11 +113,6 @@ unsigned long hugetlb_change_protection(struct vm_area_struct *vma,
109 113
110#else /* !CONFIG_HUGETLB_PAGE */ 114#else /* !CONFIG_HUGETLB_PAGE */
111 115
112static inline int PageHuge(struct page *page)
113{
114 return 0;
115}
116
117static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) 116static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
118{ 117{
119} 118}
@@ -152,7 +151,6 @@ static inline bool isolate_huge_page(struct page *page, struct list_head *list)
152 return false; 151 return false;
153} 152}
154#define putback_active_hugepage(p) do {} while (0) 153#define putback_active_hugepage(p) do {} while (0)
155#define is_hugepage_active(x) false
156 154
157static inline unsigned long hugetlb_change_protection(struct vm_area_struct *vma, 155static inline unsigned long hugetlb_change_protection(struct vm_area_struct *vma,
158 unsigned long address, unsigned long end, pgprot_t newprot) 156 unsigned long address, unsigned long end, pgprot_t newprot)