diff options
Diffstat (limited to 'include/linux/rmap.h')
-rw-r--r-- | include/linux/rmap.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index c0c2bce6b0b7..c4c559a45dc8 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -37,6 +37,16 @@ struct anon_vma { | |||
37 | atomic_t refcount; | 37 | atomic_t refcount; |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Count of child anon_vmas and VMAs which points to this anon_vma. | ||
41 | * | ||
42 | * This counter is used for making decision about reusing anon_vma | ||
43 | * instead of forking new one. See comments in function anon_vma_clone. | ||
44 | */ | ||
45 | unsigned degree; | ||
46 | |||
47 | struct anon_vma *parent; /* Parent of this anon_vma */ | ||
48 | |||
49 | /* | ||
40 | * NOTE: the LSB of the rb_root.rb_node is set by | 50 | * NOTE: the LSB of the rb_root.rb_node is set by |
41 | * mm_take_all_locks() _after_ taking the above lock. So the | 51 | * mm_take_all_locks() _after_ taking the above lock. So the |
42 | * rb_root must only be read/written after taking the above lock | 52 | * rb_root must only be read/written after taking the above lock |
@@ -188,7 +198,7 @@ int page_referenced(struct page *, int is_locked, | |||
188 | int try_to_unmap(struct page *, enum ttu_flags flags); | 198 | int try_to_unmap(struct page *, enum ttu_flags flags); |
189 | 199 | ||
190 | /* | 200 | /* |
191 | * Called from mm/filemap_xip.c to unmap empty zero page | 201 | * Used by uprobes to replace a userspace page safely |
192 | */ | 202 | */ |
193 | pte_t *__page_check_address(struct page *, struct mm_struct *, | 203 | pte_t *__page_check_address(struct page *, struct mm_struct *, |
194 | unsigned long, spinlock_t **, int); | 204 | unsigned long, spinlock_t **, int); |
@@ -236,7 +246,6 @@ int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); | |||
236 | * arg: passed to rmap_one() and invalid_vma() | 246 | * arg: passed to rmap_one() and invalid_vma() |
237 | * rmap_one: executed on each vma where page is mapped | 247 | * rmap_one: executed on each vma where page is mapped |
238 | * done: for checking traversing termination condition | 248 | * done: for checking traversing termination condition |
239 | * file_nonlinear: for handling file nonlinear mapping | ||
240 | * anon_lock: for getting anon_lock by optimized way rather than default | 249 | * anon_lock: for getting anon_lock by optimized way rather than default |
241 | * invalid_vma: for skipping uninterested vma | 250 | * invalid_vma: for skipping uninterested vma |
242 | */ | 251 | */ |
@@ -245,7 +254,6 @@ struct rmap_walk_control { | |||
245 | int (*rmap_one)(struct page *page, struct vm_area_struct *vma, | 254 | int (*rmap_one)(struct page *page, struct vm_area_struct *vma, |
246 | unsigned long addr, void *arg); | 255 | unsigned long addr, void *arg); |
247 | int (*done)(struct page *page); | 256 | int (*done)(struct page *page); |
248 | int (*file_nonlinear)(struct page *, struct address_space *, void *arg); | ||
249 | struct anon_vma *(*anon_lock)(struct page *page); | 257 | struct anon_vma *(*anon_lock)(struct page *page); |
250 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); | 258 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); |
251 | }; | 259 | }; |