]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: zswap: fix the lack of page lru flag in zswap_writeback_entry
authorZhongkun He <hezhongkun.hzk@bytedance.com>
Tue, 24 Oct 2023 14:27:06 +0000 (22:27 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:16:46 +0000 (13:16 -0800)
commita844ddcbe0455a42d452751cb135893e0865a0b7
tree016bfa68ff416a816a85a4ff19ec2aadd727dd3f
parentea2bfb36af7dc88d3d6917112f0c9ad7b9db972a
mm: zswap: fix the lack of page lru flag in zswap_writeback_entry

The zswap_writeback_entry() will add a page to the swap cache, decompress
the entry data into the page, and issue a bio write to write the page back
to the swap device.  Move the page to the tail of lru list through
SetPageReclaim(page) and folio_rotate_reclaimable().

Currently, about half of the pages will fail to move to the tail of lru
list because there is no LRU flag in page which is not in the LRU list but
the cpu_fbatches.  So fix it.

Link: https://lkml.kernel.org/r/20231024142706.195517-1-hezhongkun.hzk@bytedance.com
Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/zswap.c