aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/memcontrol.h2
-rw-r--r--include/linux/mm.h9
-rw-r--r--include/linux/mm_types.h6
-rw-r--r--include/linux/mmzone.h6
-rw-r--r--include/linux/radix-tree.h16
5 files changed, 31 insertions, 8 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 9ae48d4aeb5e..792c8981e633 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -51,7 +51,7 @@ enum mem_cgroup_stat_index {
51 MEM_CGROUP_STAT_SWAP, /* # of pages, swapped out */ 51 MEM_CGROUP_STAT_SWAP, /* # of pages, swapped out */
52 MEM_CGROUP_STAT_NSTATS, 52 MEM_CGROUP_STAT_NSTATS,
53 /* default hierarchy stats */ 53 /* default hierarchy stats */
54 MEMCG_SOCK, 54 MEMCG_SOCK = MEM_CGROUP_STAT_NSTATS,
55 MEMCG_NR_STAT, 55 MEMCG_NR_STAT,
56}; 56};
57 57
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f1cd22f2df1a..516e14944339 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -201,11 +201,13 @@ extern unsigned int kobjsize(const void *objp);
201#endif 201#endif
202 202
203#ifdef CONFIG_STACK_GROWSUP 203#ifdef CONFIG_STACK_GROWSUP
204#define VM_STACK_FLAGS (VM_GROWSUP | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) 204#define VM_STACK VM_GROWSUP
205#else 205#else
206#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) 206#define VM_STACK VM_GROWSDOWN
207#endif 207#endif
208 208
209#define VM_STACK_FLAGS (VM_STACK | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
210
209/* 211/*
210 * Special vmas that are non-mergable, non-mlock()able. 212 * Special vmas that are non-mergable, non-mlock()able.
211 * Note: mm/huge_memory.c VM_NO_THP depends on this definition. 213 * Note: mm/huge_memory.c VM_NO_THP depends on this definition.
@@ -1341,8 +1343,7 @@ static inline int stack_guard_page_end(struct vm_area_struct *vma,
1341 !vma_growsup(vma->vm_next, addr); 1343 !vma_growsup(vma->vm_next, addr);
1342} 1344}
1343 1345
1344extern struct task_struct *task_of_stack(struct task_struct *task, 1346int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t);
1345 struct vm_area_struct *vma, bool in_group);
1346 1347
1347extern unsigned long move_page_tables(struct vm_area_struct *vma, 1348extern unsigned long move_page_tables(struct vm_area_struct *vma,
1348 unsigned long old_addr, struct vm_area_struct *new_vma, 1349 unsigned long old_addr, struct vm_area_struct *new_vma,
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index d3ebb9d21a53..624b78b848b8 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -424,9 +424,9 @@ struct mm_struct {
424 unsigned long total_vm; /* Total pages mapped */ 424 unsigned long total_vm; /* Total pages mapped */
425 unsigned long locked_vm; /* Pages that have PG_mlocked set */ 425 unsigned long locked_vm; /* Pages that have PG_mlocked set */
426 unsigned long pinned_vm; /* Refcount permanently increased */ 426 unsigned long pinned_vm; /* Refcount permanently increased */
427 unsigned long data_vm; /* VM_WRITE & ~VM_SHARED/GROWSDOWN */ 427 unsigned long data_vm; /* VM_WRITE & ~VM_SHARED & ~VM_STACK */
428 unsigned long exec_vm; /* VM_EXEC & ~VM_WRITE */ 428 unsigned long exec_vm; /* VM_EXEC & ~VM_WRITE & ~VM_STACK */
429 unsigned long stack_vm; /* VM_GROWSUP/DOWN */ 429 unsigned long stack_vm; /* VM_STACK */
430 unsigned long def_flags; 430 unsigned long def_flags;
431 unsigned long start_code, end_code, start_data, end_data; 431 unsigned long start_code, end_code, start_data, end_data;
432 unsigned long start_brk, brk, start_stack; 432 unsigned long start_brk, brk, start_stack;
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 33bb1b19273e..7b6c2cfee390 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -682,6 +682,12 @@ typedef struct pglist_data {
682 */ 682 */
683 unsigned long first_deferred_pfn; 683 unsigned long first_deferred_pfn;
684#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */ 684#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
685
686#ifdef CONFIG_TRANSPARENT_HUGEPAGE
687 spinlock_t split_queue_lock;
688 struct list_head split_queue;
689 unsigned long split_queue_len;
690#endif
685} pg_data_t; 691} pg_data_t;
686 692
687#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) 693#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages)
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 7c88ad156a29..00b17c526c1f 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -379,6 +379,22 @@ void **radix_tree_next_chunk(struct radix_tree_root *root,
379 struct radix_tree_iter *iter, unsigned flags); 379 struct radix_tree_iter *iter, unsigned flags);
380 380
381/** 381/**
382 * radix_tree_iter_retry - retry this chunk of the iteration
383 * @iter: iterator state
384 *
385 * If we iterate over a tree protected only by the RCU lock, a race
386 * against deletion or creation may result in seeing a slot for which
387 * radix_tree_deref_retry() returns true. If so, call this function
388 * and continue the iteration.
389 */
390static inline __must_check
391void **radix_tree_iter_retry(struct radix_tree_iter *iter)
392{
393 iter->next_index = iter->index;
394 return NULL;
395}
396
397/**
382 * radix_tree_chunk_size - get current chunk size 398 * radix_tree_chunk_size - get current chunk size
383 * 399 *
384 * @iter: pointer to radix tree iterator 400 * @iter: pointer to radix tree iterator