mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
[PATCH] SwapMig: Drop unused pages immediately
Drop unused pages immediately If a page is encountered that is only referenced by the migration code then there is no reason to swap or migrate the page. Release the page by calling move_to_lru(). 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:
1 parent
1480a540c9
commit
ee27497df3
1 file changed
+5
@@ -689,6 +689,11 @@ redo:
|
|||||||
list_for_each_entry_safe(page, page2, l, lru) {
|
list_for_each_entry_safe(page, page2, l, lru) {
|
||||||
cond_resched();
|
cond_resched();
|
||||||
|
|
||||||
|
if (page_count(page) == 1) {
|
||||||
|
/* page was freed from under us. So we are done. */
|
||||||
|
move_to_lru(page);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Skip locked pages during the first two passes to give the
|
* Skip locked pages during the first two passes to give the
|
||||||
* functions holding the lock time to release the page. Later we
|
* functions holding the lock time to release the page. Later we
|
||||||
|
|||||||
Reference in new issue
Block a user