aboutsummaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-06-23 05:03:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:42:50 -0400
commitd75a0fcda2cfc71b50e16dc89e0c32c57d427e85 (patch)
treecc9dda0a0e53e62c859bf7fcafe7b9c9f6de2352 /mm/rmap.c
parent0697212a411c1dae03c27845f2de2f3adb32c331 (diff)
[PATCH] Swapless page migration: rip out swap based logic
Rip the page migration logic out. Remove all code that has to do with swapping during page migration. This also guts the ability to migrate pages to swap. No one used that so lets let it go for good. Page migration should be a bit broken after this patch. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 3b8ce86daa3a..a53a10b93ecf 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -205,44 +205,6 @@ out:
205 return anon_vma; 205 return anon_vma;
206} 206}
207 207
208#ifdef CONFIG_MIGRATION
209/*
210 * Remove an anonymous page from swap replacing the swap pte's
211 * through real pte's pointing to valid pages and then releasing
212 * the page from the swap cache.
213 *
214 * Must hold page lock on page and mmap_sem of one vma that contains
215 * the page.
216 */
217void remove_from_swap(struct page *page)
218{
219 struct anon_vma *anon_vma;
220 struct vm_area_struct *vma;
221 unsigned long mapping;
222
223 if (!PageSwapCache(page))
224 return;
225
226 mapping = (unsigned long)page->mapping;
227
228 if (!mapping || (mapping & PAGE_MAPPING_ANON) == 0)
229 return;
230
231 /*
232 * We hold the mmap_sem lock. So no need to call page_lock_anon_vma.
233 */
234 anon_vma = (struct anon_vma *) (mapping - PAGE_MAPPING_ANON);
235 spin_lock(&anon_vma->lock);
236
237 list_for_each_entry(vma, &anon_vma->head, anon_vma_node)
238 remove_vma_swap(vma, page);
239
240 spin_unlock(&anon_vma->lock);
241 delete_from_swap_cache(page);
242}
243EXPORT_SYMBOL(remove_from_swap);
244#endif
245
246/* 208/*
247 * At what user virtual address is page expected in vma? 209 * At what user virtual address is page expected in vma?
248 */ 210 */