On 2024/6/17 13:16, Yu Zhao wrote:
On Mon, Jun 17, 2024 at 6:58 AM Chengming Zhou <chengming.zhou@xxxxxxxxx> wrote:
Zswap uses 32 pools to workaround the locking scalability problem in
zsmalloc,
Note that zpool can have other backends (zbud, z3fold), and the
original patch was developed (even before zswap could use zsmalloc) to
make sure it works for all the backend.
This patch only makes sense now only because zsmalloc became a lot
more popular than other backends (even though some distros still
default to zbud).
Right, we mostly focus on zsmalloc, I just do the same testing using zbud:
real user sys
6.10.0-rc3-zbud 138.23 1239.58 1430.09
6.10.0-rc3-onepool-zbud 139.64 1241.37 1516.59
Since we don't do any locking optimization for zbud, so performance
is worse than 32 pools as expected.
Actually Yosry did a great testing [1] to compare zsmalloc, zbud and
z3flod, to support that we can just use zsmalloc in zswap, so we can
drop zpool, zbud and z3flod.
I will include this information in the changelog in the next version.
[1]
https://lore.kernel.org/lkml/CAJD7tkbRF6od-2x_L8-A1QL3=2Ww13sCj4S3i4bNndqF+3+_Vg@xxxxxxxxxxxxxx/
Thanks.