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.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 2723513a5651..176e7ee73eff 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -10,6 +10,7 @@
10#include <asm/tlbflush.h> 10#include <asm/tlbflush.h>
11 11
12struct ctl_table; 12struct ctl_table;
13struct user_struct;
13 14
14int PageHuge(struct page *page); 15int PageHuge(struct page *page);
15 16
@@ -23,7 +24,9 @@ int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *
23int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); 24int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);
24int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); 25int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);
25int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); 26int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
26int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int, int); 27int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
28 struct page **, struct vm_area_struct **,
29 unsigned long *, int *, int, unsigned int flags);
27void unmap_hugepage_range(struct vm_area_struct *, 30void unmap_hugepage_range(struct vm_area_struct *,
28 unsigned long, unsigned long, struct page *); 31 unsigned long, unsigned long, struct page *);
29void __unmap_hugepage_range(struct vm_area_struct *, 32void __unmap_hugepage_range(struct vm_area_struct *,
@@ -109,6 +112,21 @@ static inline void hugetlb_report_meminfo(struct seq_file *m)
109 112
110#endif /* !CONFIG_HUGETLB_PAGE */ 113#endif /* !CONFIG_HUGETLB_PAGE */
111 114
115#define HUGETLB_ANON_FILE "anon_hugepage"
116
117enum {
118 /*
119 * The file will be used as an shm file so shmfs accounting rules
120 * apply
121 */
122 HUGETLB_SHMFS_INODE = 1,
123 /*
124 * The file is being created on the internal vfs mount and shmfs
125 * accounting rules do not apply
126 */
127 HUGETLB_ANONHUGE_INODE = 2,
128};
129
112#ifdef CONFIG_HUGETLBFS 130#ifdef CONFIG_HUGETLBFS
113struct hugetlbfs_config { 131struct hugetlbfs_config {
114 uid_t uid; 132 uid_t uid;
@@ -146,7 +164,8 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
146 164
147extern const struct file_operations hugetlbfs_file_operations; 165extern const struct file_operations hugetlbfs_file_operations;
148extern struct vm_operations_struct hugetlb_vm_ops; 166extern struct vm_operations_struct hugetlb_vm_ops;
149struct file *hugetlb_file_setup(const char *name, size_t, int); 167struct file *hugetlb_file_setup(const char *name, size_t size, int acct,
168 struct user_struct **user, int creat_flags);
150int hugetlb_get_quota(struct address_space *mapping, long delta); 169int hugetlb_get_quota(struct address_space *mapping, long delta);
151void hugetlb_put_quota(struct address_space *mapping, long delta); 170void hugetlb_put_quota(struct address_space *mapping, long delta);
152 171
@@ -168,7 +187,7 @@ static inline void set_file_hugepages(struct file *file)
168 187
169#define is_file_hugepages(file) 0 188#define is_file_hugepages(file) 0
170#define set_file_hugepages(file) BUG() 189#define set_file_hugepages(file) BUG()
171#define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) 190#define hugetlb_file_setup(name,size,acct,user,creat) ERR_PTR(-ENOSYS)
172 191
173#endif /* !CONFIG_HUGETLBFS */ 192#endif /* !CONFIG_HUGETLBFS */
174 193
@@ -183,7 +202,8 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
183#define HSTATE_NAME_LEN 32 202#define HSTATE_NAME_LEN 32
184/* Defines one hugetlb page size */ 203/* Defines one hugetlb page size */
185struct hstate { 204struct hstate {
186 int hugetlb_next_nid; 205 int next_nid_to_alloc;
206 int next_nid_to_free;
187 unsigned int order; 207 unsigned int order;
188 unsigned long mask; 208 unsigned long mask;
189 unsigned long max_huge_pages; 209 unsigned long max_huge_pages;