diff options
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 7adc4923e7ac..cf0181738c9e 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -14,6 +14,15 @@ struct user_struct; | |||
14 | #include <linux/shm.h> | 14 | #include <linux/shm.h> |
15 | #include <asm/tlbflush.h> | 15 | #include <asm/tlbflush.h> |
16 | 16 | ||
17 | struct hugepage_subpool { | ||
18 | spinlock_t lock; | ||
19 | long count; | ||
20 | long max_hpages, used_hpages; | ||
21 | }; | ||
22 | |||
23 | struct hugepage_subpool *hugepage_new_subpool(long nr_blocks); | ||
24 | void hugepage_put_subpool(struct hugepage_subpool *spool); | ||
25 | |||
17 | int PageHuge(struct page *page); | 26 | int PageHuge(struct page *page); |
18 | 27 | ||
19 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); | 28 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); |
@@ -129,12 +138,11 @@ enum { | |||
129 | 138 | ||
130 | #ifdef CONFIG_HUGETLBFS | 139 | #ifdef CONFIG_HUGETLBFS |
131 | struct hugetlbfs_sb_info { | 140 | struct hugetlbfs_sb_info { |
132 | long max_blocks; /* blocks allowed */ | ||
133 | long free_blocks; /* blocks free */ | ||
134 | long max_inodes; /* inodes allowed */ | 141 | long max_inodes; /* inodes allowed */ |
135 | long free_inodes; /* inodes free */ | 142 | long free_inodes; /* inodes free */ |
136 | spinlock_t stat_lock; | 143 | spinlock_t stat_lock; |
137 | struct hstate *hstate; | 144 | struct hstate *hstate; |
145 | struct hugepage_subpool *spool; | ||
138 | }; | 146 | }; |
139 | 147 | ||
140 | static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | 148 | static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) |
@@ -146,8 +154,6 @@ extern const struct file_operations hugetlbfs_file_operations; | |||
146 | extern const struct vm_operations_struct hugetlb_vm_ops; | 154 | extern const struct vm_operations_struct hugetlb_vm_ops; |
147 | struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct, | 155 | struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct, |
148 | struct user_struct **user, int creat_flags); | 156 | struct user_struct **user, int creat_flags); |
149 | int hugetlb_get_quota(struct address_space *mapping, long delta); | ||
150 | void hugetlb_put_quota(struct address_space *mapping, long delta); | ||
151 | 157 | ||
152 | static inline int is_file_hugepages(struct file *file) | 158 | static inline int is_file_hugepages(struct file *file) |
153 | { | 159 | { |