diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-02-01 06:05:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 11:53:16 -0500 |
commit | a3351e525e4768c29aa5d22ef59b5b38e0361e53 (patch) | |
tree | 457ab54f402b471c5158e8b361d059e88ab8cd62 /mm/swapfile.c | |
parent | a48d07afdf18212de22b959715b16793c5a6e57a (diff) |
[PATCH] Direct Migration V9: remove_from_swap() to remove swap ptes
Add remove_from_swap
remove_from_swap() allows the restoration of the pte entries that existed
before page migration occurred for anonymous pages by walking the reverse
maps. This reduces swap use and establishes regular pte's without the need
for page faults.
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/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 9678182e0eef..1f9cf0d073b8 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -554,6 +554,15 @@ static int unuse_mm(struct mm_struct *mm, | |||
554 | return 0; | 554 | return 0; |
555 | } | 555 | } |
556 | 556 | ||
557 | #ifdef CONFIG_MIGRATION | ||
558 | int remove_vma_swap(struct vm_area_struct *vma, struct page *page) | ||
559 | { | ||
560 | swp_entry_t entry = { .val = page_private(page) }; | ||
561 | |||
562 | return unuse_vma(vma, entry, page); | ||
563 | } | ||
564 | #endif | ||
565 | |||
557 | /* | 566 | /* |
558 | * Scan swap_map from current position to next entry still in use. | 567 | * Scan swap_map from current position to next entry still in use. |
559 | * Recycle to start on reaching the end, returning 0 when empty. | 568 | * Recycle to start on reaching the end, returning 0 when empty. |