summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorWeijie Yang <weijie.yang@samsung.com>2013-11-12 15:07:52 -0800
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:47:20 +0900
commit922dde323d08b28c1d3acf3dd03b68c3606b712c (patch)
tree57f95ccfb9bd54ee5fa0c39c8c80e276eb11d1aa /mm
parent200e32eaec5f4407ea07a594d4ea0c2f4fe2efdc (diff)
downloadlinux-3.10-922dde323d08b28c1d3acf3dd03b68c3606b712c.tar.gz
linux-3.10-922dde323d08b28c1d3acf3dd03b68c3606b712c.tar.bz2
linux-3.10-922dde323d08b28c1d3acf3dd03b68c3606b712c.zip
mm/zswap: avoid unnecessary page scanning
Add SetPageReclaim() before __swap_writepage() so that page can be moved to the tail of the inactive list, which can avoid unnecessary page scanning as this page was reclaimed by swap subsystem before. Change-Id: If1ed52e3161c332d9f1f6fdd8851e97b5d3b4271 Signed-off-by: Weijie Yang <weijie.yang@samsung.com> Reviewed-by: Bob Liu <bob.liu@oracle.com> Reviewed-by: Minchan Kim <minchan@kernel.org> Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/zswap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/zswap.c b/mm/zswap.c
index d93510c6aa2..001474c1a59 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -556,6 +556,9 @@ static int zswap_writeback_entry(struct zbud_pool *pool, unsigned long handle)
SetPageUptodate(page);
}
+ /* move it to the tail of the inactive list after end_writeback */
+ SetPageReclaim(page);
+
/* start writeback */
__swap_writepage(page, &wbc, end_swap_bio_write);
page_cache_release(page);