mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a48d07afdf
commit
a3351e525e
5 changed files with 49 additions and 0 deletions
|
|
@ -554,6 +554,15 @@ static int unuse_mm(struct mm_struct *mm,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIGRATION
|
||||
int remove_vma_swap(struct vm_area_struct *vma, struct page *page)
|
||||
{
|
||||
swp_entry_t entry = { .val = page_private(page) };
|
||||
|
||||
return unuse_vma(vma, entry, page);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Scan swap_map from current position to next entry still in use.
|
||||
* Recycle to start on reaching the end, returning 0 when empty.
|
||||
|
|
|
|||
Loading…
Reference in a new issue