mm/zswap: avoid unnecessary page scanning
Subsystems (3)
PATCH v3 3/3 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.
--- mm/zswap.c | 3 +++ 1 file changed, 3 insertions(+)
mm/zswap.c +3 -0
@@ -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);
Signature · 1 line
1.7.10.4
Quoted 9 lines · Weijie Yang
add SetPageReclaim before
__swap_writepageso 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.Signed-off-by Weijie Yang <[email protected]>Reviewed-by Bob Liu <[email protected]>Cc Minchan Kim <[email protected]>Acked-by Seth Jennings <[email protected]>
Signature · 8 lines
Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 9 lines · On Mon, 23 Sep 2013 16:21:49 +0800 Weijie Yang <[email protected]> wrote:
add SetPageReclaim before
__swap_writepageso 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.Signed-off-by Weijie Yang <[email protected]>Reviewed-by Bob Liu <[email protected]>Cc Minchan Kim <[email protected]>Acked-by Seth Jennings <[email protected]>
As a minor(?) performance tweak, I don't believe this is suitable for -stable backporting, so I took that out. If you believe this was a mistake, please explain why.
Quoted 12 lines · Andrew Morton
Quoted 9 lines · On Mon, 23 Sep 2013 16:21:49 +0800 Weijie Yang <[email protected]> wrote:
add SetPageReclaim before
__swap_writepageso 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.Signed-off-by Weijie Yang <[email protected]>Reviewed-by Bob Liu <[email protected]>Cc Minchan Kim <[email protected]>Acked-by Seth Jennings <[email protected]>
Quoted 4 lines
As a minor(?) performance tweak, I don't believe this is suitable for -stable backporting, so I took that out. If you believe this was a mistake, please explain why.
Yes. It's never stable stuff.
Signature · 2 lines
Kind regards, Minchan Kim