aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ksm.h13
-rw-r--r--include/linux/rmap.h6
2 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index 157d83dbaef..bed5f16ba82 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -88,6 +88,9 @@ static inline struct page *ksm_might_need_to_copy(struct page *page,
88int page_referenced_ksm(struct page *page, 88int page_referenced_ksm(struct page *page,
89 struct mem_cgroup *memcg, unsigned long *vm_flags); 89 struct mem_cgroup *memcg, unsigned long *vm_flags);
90int try_to_unmap_ksm(struct page *page, enum ttu_flags flags); 90int try_to_unmap_ksm(struct page *page, enum ttu_flags flags);
91int rmap_walk_ksm(struct page *page, int (*rmap_one)(struct page *,
92 struct vm_area_struct *, unsigned long, void *), void *arg);
93void ksm_migrate_page(struct page *newpage, struct page *oldpage);
91 94
92#else /* !CONFIG_KSM */ 95#else /* !CONFIG_KSM */
93 96
@@ -127,6 +130,16 @@ static inline int try_to_unmap_ksm(struct page *page, enum ttu_flags flags)
127{ 130{
128 return 0; 131 return 0;
129} 132}
133
134static inline int rmap_walk_ksm(struct page *page, int (*rmap_one)(struct page*,
135 struct vm_area_struct *, unsigned long, void *), void *arg)
136{
137 return 0;
138}
139
140static inline void ksm_migrate_page(struct page *newpage, struct page *oldpage)
141{
142}
130#endif /* !CONFIG_KSM */ 143#endif /* !CONFIG_KSM */
131 144
132#endif /* __LINUX_KSM_H */ 145#endif /* __LINUX_KSM_H */
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 980094a527e..b019ae64e2a 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -164,6 +164,12 @@ struct anon_vma *page_lock_anon_vma(struct page *page);
164void page_unlock_anon_vma(struct anon_vma *anon_vma); 164void page_unlock_anon_vma(struct anon_vma *anon_vma);
165int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); 165int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma);
166 166
167/*
168 * Called by migrate.c to remove migration ptes, but might be used more later.
169 */
170int rmap_walk(struct page *page, int (*rmap_one)(struct page *,
171 struct vm_area_struct *, unsigned long, void *), void *arg);
172
167#else /* !CONFIG_MMU */ 173#else /* !CONFIG_MMU */
168 174
169#define anon_vma_init() do {} while (0) 175#define anon_vma_init() do {} while (0)