diff options
Diffstat (limited to 'include/linux/hugetlb.h')
| -rw-r--r-- | include/linux/hugetlb.h | 20 |
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; | |||
| 22 | struct hugepage_subpool { | 22 | struct 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 | ||
| 28 | struct resv_map { | 34 | struct 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 | ||
| 41 | struct hugepage_subpool *hugepage_new_subpool(long nr_blocks); | 47 | struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages, |
| 48 | long min_hpages); | ||
| 42 | void hugepage_put_subpool(struct hugepage_subpool *spool); | 49 | void hugepage_put_subpool(struct hugepage_subpool *spool); |
| 43 | 50 | ||
| 44 | int PageHuge(struct page *page); | ||
| 45 | |||
| 46 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); | 51 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); |
| 47 | int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); | 52 | int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
| 48 | int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); | 53 | int 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); | |||
| 79 | int dequeue_hwpoisoned_huge_page(struct page *page); | 84 | int dequeue_hwpoisoned_huge_page(struct page *page); |
| 80 | bool isolate_huge_page(struct page *page, struct list_head *list); | 85 | bool isolate_huge_page(struct page *page, struct list_head *list); |
| 81 | void putback_active_hugepage(struct page *page); | 86 | void putback_active_hugepage(struct page *page); |
| 82 | bool is_hugepage_active(struct page *page); | ||
| 83 | void free_huge_page(struct page *page); | 87 | void 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 | ||
| 112 | static inline int PageHuge(struct page *page) | ||
| 113 | { | ||
| 114 | return 0; | ||
| 115 | } | ||
| 116 | |||
| 117 | static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) | 116 | static 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 | ||
| 157 | static inline unsigned long hugetlb_change_protection(struct vm_area_struct *vma, | 155 | static 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) |
