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.h14
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
17struct hugepage_subpool {
18 spinlock_t lock;
19 long count;
20 long max_hpages, used_hpages;
21};
22
23struct hugepage_subpool *hugepage_new_subpool(long nr_blocks);
24void hugepage_put_subpool(struct hugepage_subpool *spool);
25
17int PageHuge(struct page *page); 26int PageHuge(struct page *page);
18 27
19void reset_vma_resv_huge_pages(struct vm_area_struct *vma); 28void 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
131struct hugetlbfs_sb_info { 140struct 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
140static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) 148static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
@@ -146,8 +154,6 @@ extern const struct file_operations hugetlbfs_file_operations;
146extern const struct vm_operations_struct hugetlb_vm_ops; 154extern const struct vm_operations_struct hugetlb_vm_ops;
147struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct, 155struct 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);
149int hugetlb_get_quota(struct address_space *mapping, long delta);
150void hugetlb_put_quota(struct address_space *mapping, long delta);
151 157
152static inline int is_file_hugepages(struct file *file) 158static inline int is_file_hugepages(struct file *file)
153{ 159{