From: Johannes Weiner <hannes@cmpxchg.org>
To: Chengming Zhou <zhouchengming@bytedance.com>
Cc: Nhat Pham <nphamcs@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Yosry Ahmed <yosryahmed@google.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 5/6] mm/zswap: only support zswap_exclusive_loads_enabled
Date: Fri, 2 Feb 2024 11:26:35 -0500 [thread overview]
Message-ID: <20240202162635.GF1227330@cmpxchg.org> (raw)
In-Reply-To: <d5455b43-aa22-4931-a6b3-062128f4d30f@bytedance.com>
On Fri, Feb 02, 2024 at 08:57:38PM +0800, Chengming Zhou wrote:
> On 2024/2/2 02:12, Johannes Weiner wrote:
> > Caching "swapout work" is helpful when the system is thrashing. Then
> > recently swapped in pages might get swapped out again very soon. It
> > certainly makes sense with conventional swap, because keeping a clean
> > copy on the disk saves IO work and doesn't cost any additional memory.
> >
> > But with zswap, it's different. It saves some compression work on a
> > thrashing page. But the act of keeping compressed memory contributes
> > to a higher rate of thrashing. And that can cause IO in other places
> > like zswap writeback and file memory.
>
> [...] A/B test kernel building in tmpfs directory, memory.max=2GB.
> (zswap writeback enabled and shrinker_enabled, one 50GB swapfile)
>
> From the below results, exclusive mode has fewer scan and refault.
>
> zswap-invalidate-entry zswap-invalidate-entry-exclusive
> real 63.80 63.01
> user 1063.83 1061.32
> sys 290.31 266.15
> zswap-invalidate-entry zswap-invalidate-entry-exclusive
> workingset_refault_anon 2383084.40 1976397.40
> workingset_refault_file 44134.00 45689.40
> workingset_activate_anon 837878.00 728441.20
> workingset_activate_file 4710.00 4085.20
> workingset_restore_anon 732622.60 639428.40
> workingset_restore_file 1007.00 926.80
> workingset_nodereclaim 0.00 0.00
> pgscan 14343003.40 12409570.20
> pgscan_kswapd 0.00 0.00
> pgscan_direct 14343003.40 12409570.20
> pgscan_khugepaged 0.00 0.00
That's perfect. Thanks!
Would you mind adding all of the above into the changelog?
With that,
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
next prev parent reply other threads:[~2024-02-02 16:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 15:49 [PATCH 0/6] mm/zswap: optimize zswap lru list Chengming Zhou
2024-02-01 15:49 ` [PATCH 1/6] mm/zswap: add more comments in shrink_memcg_cb() Chengming Zhou
2024-02-01 17:45 ` Johannes Weiner
2024-02-01 23:55 ` Yosry Ahmed
2024-02-02 22:25 ` Nhat Pham
2024-02-01 15:49 ` [PATCH 2/6] mm/zswap: invalidate zswap entry when swap entry free Chengming Zhou
2024-02-01 17:49 ` Johannes Weiner
2024-02-01 20:56 ` Nhat Pham
2024-02-02 0:11 ` Yosry Ahmed
2024-02-02 8:10 ` Chengming Zhou
2024-02-01 15:49 ` [PATCH 3/6] mm/zswap: stop lru list shrinking when encounter warm region Chengming Zhou
2024-02-01 17:51 ` Johannes Weiner
2024-02-01 18:10 ` Nhat Pham
2024-02-02 0:15 ` Yosry Ahmed
2024-02-02 8:12 ` Chengming Zhou
2024-02-01 15:49 ` [PATCH 4/6] mm/zswap: remove duplicate_entry debug value Chengming Zhou
2024-02-01 17:55 ` Johannes Weiner
2024-02-02 8:18 ` Chengming Zhou
2024-02-02 22:17 ` Yosry Ahmed
2024-02-02 22:28 ` Nhat Pham
2024-02-03 4:29 ` Chengming Zhou
2024-02-01 15:49 ` [PATCH 5/6] mm/zswap: only support zswap_exclusive_loads_enabled Chengming Zhou
2024-02-01 18:12 ` Johannes Weiner
2024-02-02 1:04 ` Yosry Ahmed
2024-02-02 12:57 ` Chengming Zhou
2024-02-02 16:26 ` Johannes Weiner [this message]
2024-02-03 4:33 ` Chengming Zhou
2024-02-02 22:15 ` Yosry Ahmed
2024-02-02 22:31 ` Nhat Pham
2024-02-01 15:49 ` [PATCH 6/6] mm/zswap: zswap entry doesn't need refcount anymore Chengming Zhou
2024-02-02 1:11 ` Yosry Ahmed
2024-02-02 13:00 ` Chengming Zhou
2024-02-02 16:28 ` Johannes Weiner
2024-02-02 22:33 ` Nhat Pham
2024-02-02 22:36 ` Yosry Ahmed
2024-02-02 22:44 ` Nhat Pham
2024-02-03 5:09 ` Chengming Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240202162635.GF1227330@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=yosryahmed@google.com \
--cc=zhouchengming@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox