Messages in this thread Patch in this message | | | From | "Wang, Yalin" <> | Date | Wed, 11 Mar 2015 17:47:28 +0800 | Subject | [RFC] mm:do recheck for freeable page in reclaim path |
| |
In reclaim path, if encounter a freeable page, the try_to_unmap may fail, because the page's pte is dirty, we can recheck this page as normal non-freeable page, this means we can swap out this page into swap partition.
Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com> --- mm/vmscan.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/mm/vmscan.c b/mm/vmscan.c index 260c413..9930850 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1000,6 +1000,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, } } +recheck: if (!force_reclaim) references = page_check_references(page, sc, &freeable); @@ -1045,6 +1046,10 @@ unmap: switch (try_to_unmap(page, freeable ? TTU_FREE : ttu_flags)) { case SWAP_FAIL: + if (freeable) { + freeable = false; + goto recheck; + } goto activate_locked; case SWAP_AGAIN: goto keep_locked; -- 2.2.2
| |