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

[PATCH] zone_reclaim: do not unmap file backed pages

zone_reclaim should leave that to the real swapper.  We are only interested
in evicting unmapped pages.
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4e6a510a
......@@ -477,6 +477,12 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
* processes. Try to unmap it here.
*/
if (page_mapped(page) && mapping) {
/*
* No unmapping if we do not swap
*/
if (!sc->may_swap)
goto keep_locked;
switch (try_to_unmap(page)) {
case SWAP_FAIL:
goto activate_locked;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册