diff options
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 28 |
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 | ||
12 | struct ctl_table; | 12 | struct ctl_table; |
13 | struct user_struct; | ||
13 | 14 | ||
14 | int PageHuge(struct page *page); | 15 | int PageHuge(struct page *page); |
15 | 16 | ||
@@ -23,7 +24,9 @@ int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user * | |||
23 | int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 24 | int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
24 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 25 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
25 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); | 26 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
26 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int, int); | 27 | int 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); | ||
27 | void unmap_hugepage_range(struct vm_area_struct *, | 30 | void unmap_hugepage_range(struct vm_area_struct *, |
28 | unsigned long, unsigned long, struct page *); | 31 | unsigned long, unsigned long, struct page *); |
29 | void __unmap_hugepage_range(struct vm_area_struct *, | 32 | void __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 | |||
117 | enum { | ||
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 |
113 | struct hugetlbfs_config { | 131 | struct 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 | ||
147 | extern const struct file_operations hugetlbfs_file_operations; | 165 | extern const struct file_operations hugetlbfs_file_operations; |
148 | extern struct vm_operations_struct hugetlb_vm_ops; | 166 | extern struct vm_operations_struct hugetlb_vm_ops; |
149 | struct file *hugetlb_file_setup(const char *name, size_t, int); | 167 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, |
168 | struct user_struct **user, int creat_flags); | ||
150 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 169 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
151 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 170 | void 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 */ |
185 | struct hstate { | 204 | struct 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; |