diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 22:05:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 22:05:45 -0500 |
commit | df32e43a54d04eda35d2859beaf90e3864d53288 (patch) | |
tree | 7a61cf658b2949bd426285eb9902be7758ced1ba /include/linux/rmap.h | |
parent | fbd918a2026d0464ce9c23f57b7de4bcfccdc2e6 (diff) | |
parent | 78d5506e82b21a1a1de68c24182db2c2fe521422 (diff) |
Merge branch 'akpm' (incoming from Andrew)
Merge first patch-bomb from Andrew Morton:
- a couple of misc things
- inotify/fsnotify work from Jan
- ocfs2 updates (partial)
- about half of MM
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (117 commits)
mm/migrate: remove unused function, fail_migrate_page()
mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages
mm/migrate: correct failure handling if !hugepage_migration_support()
mm/migrate: add comment about permanent failure path
mm, page_alloc: warn for non-blockable __GFP_NOFAIL allocation failure
mm: compaction: reset scanner positions immediately when they meet
mm: compaction: do not mark unmovable pageblocks as skipped in async compaction
mm: compaction: detect when scanners meet in isolate_freepages
mm: compaction: reset cached scanner pfn's before reading them
mm: compaction: encapsulate defer reset logic
mm: compaction: trace compaction begin and end
memcg, oom: lock mem_cgroup_print_oom_info
sched: add tracepoints related to NUMA task migration
mm: numa: do not automatically migrate KSM pages
mm: numa: trace tasks that fail migration due to rate limiting
mm: numa: limit scope of lock for NUMA migrate rate limiting
mm: numa: make NUMA-migrate related functions static
lib/show_mem.c: show num_poisoned_pages when oom
mm/hwpoison: add '#' to hwpoison_inject
mm/memblock: use WARN_ONCE when MAX_NUMNODES passed as input parameter
...
Diffstat (limited to 'include/linux/rmap.h')
-rw-r--r-- | include/linux/rmap.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 6dacb93a6d94..1da693d51255 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -184,13 +184,13 @@ static inline void page_dup_rmap(struct page *page) | |||
184 | int page_referenced(struct page *, int is_locked, | 184 | int page_referenced(struct page *, int is_locked, |
185 | struct mem_cgroup *memcg, unsigned long *vm_flags); | 185 | struct mem_cgroup *memcg, unsigned long *vm_flags); |
186 | int page_referenced_one(struct page *, struct vm_area_struct *, | 186 | int page_referenced_one(struct page *, struct vm_area_struct *, |
187 | unsigned long address, unsigned int *mapcount, unsigned long *vm_flags); | 187 | unsigned long address, void *arg); |
188 | 188 | ||
189 | #define TTU_ACTION(x) ((x) & TTU_ACTION_MASK) | 189 | #define TTU_ACTION(x) ((x) & TTU_ACTION_MASK) |
190 | 190 | ||
191 | int try_to_unmap(struct page *, enum ttu_flags flags); | 191 | int try_to_unmap(struct page *, enum ttu_flags flags); |
192 | int try_to_unmap_one(struct page *, struct vm_area_struct *, | 192 | int try_to_unmap_one(struct page *, struct vm_area_struct *, |
193 | unsigned long address, enum ttu_flags flags); | 193 | unsigned long address, void *arg); |
194 | 194 | ||
195 | /* | 195 | /* |
196 | * Called from mm/filemap_xip.c to unmap empty zero page | 196 | * Called from mm/filemap_xip.c to unmap empty zero page |
@@ -236,10 +236,27 @@ void page_unlock_anon_vma_read(struct anon_vma *anon_vma); | |||
236 | int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); | 236 | int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); |
237 | 237 | ||
238 | /* | 238 | /* |
239 | * Called by migrate.c to remove migration ptes, but might be used more later. | 239 | * rmap_walk_control: To control rmap traversing for specific needs |
240 | * | ||
241 | * arg: passed to rmap_one() and invalid_vma() | ||
242 | * rmap_one: executed on each vma where page is mapped | ||
243 | * done: for checking traversing termination condition | ||
244 | * file_nonlinear: for handling file nonlinear mapping | ||
245 | * anon_lock: for getting anon_lock by optimized way rather than default | ||
246 | * invalid_vma: for skipping uninterested vma | ||
240 | */ | 247 | */ |
241 | int rmap_walk(struct page *page, int (*rmap_one)(struct page *, | 248 | struct rmap_walk_control { |
242 | struct vm_area_struct *, unsigned long, void *), void *arg); | 249 | void *arg; |
250 | int (*rmap_one)(struct page *page, struct vm_area_struct *vma, | ||
251 | unsigned long addr, void *arg); | ||
252 | int (*done)(struct page *page); | ||
253 | int (*file_nonlinear)(struct page *, struct address_space *, | ||
254 | struct vm_area_struct *vma); | ||
255 | struct anon_vma *(*anon_lock)(struct page *page); | ||
256 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); | ||
257 | }; | ||
258 | |||
259 | int rmap_walk(struct page *page, struct rmap_walk_control *rwc); | ||
243 | 260 | ||
244 | #else /* !CONFIG_MMU */ | 261 | #else /* !CONFIG_MMU */ |
245 | 262 | ||