提交 ee27497d 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[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: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 1480a540
......@@ -689,6 +689,11 @@ int migrate_pages(struct list_head *l, struct list_head *t)
list_for_each_entry_safe(page, page2, l, lru) {
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
* functions holding the lock time to release the page. Later we
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册