lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 31 May 2023 15:24:08 -0700
From:   Yosry Ahmed <yosryahmed@...gle.com>
To:     Yu Zhao <yuzhao@...gle.com>
Cc:     Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Seth Jennings <sjenning@...hat.com>,
        Dan Streetman <ddstreet@...e.org>,
        Vitaly Wool <vitaly.wool@...sulko.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Nhat Pham <nphamcs@...il.com>,
        Domenico Cerasuolo <cerasuolodomenico@...il.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm: zswap: multiple zpools support

On Wed, May 31, 2023 at 3:21 PM Yu Zhao <yuzhao@...gle.com> wrote:
>
> On Wed, May 31, 2023 at 4:13 PM Yosry Ahmed <yosryahmed@...gle.com> wrote:
> >
> > Support using multiple zpools of the same type in zswap, for concurrency
> > purposes. Add CONFIG_ZSWAP_NR_ZPOOLS_ORDER to control the number of
> > zpools. The order is specific by the config rather than the absolute
> > number to guarantee a power of 2. This is useful so that we can use
> > deterministically link each entry to a zpool by hashing the zswap_entry
> > pointer.
> >
> > On a setup with zswap and zsmalloc, comparing a single zpool (current
> > default) to 32 zpools (by setting CONFIG_ZSWAP_NR_ZPOOLS_ORDER=32) shows
> > improvements in the zsmalloc lock contention, especially on the swap out
> > path.
> >
> > The following shows the perf analysis of the swapout path when 10
> > workloads are simulatenously reclaiming and refaulting tmpfs pages.
>
> simultaneously
>
> > There are some improvements on the swap in path as well, but much less
> > significant.
>
> ...
>
> > ---
> >  mm/Kconfig | 12 +++++++
> >  mm/zswap.c | 91 ++++++++++++++++++++++++++++++++++++------------------
> >  2 files changed, 73 insertions(+), 30 deletions(-)
> >
> > diff --git a/mm/Kconfig b/mm/Kconfig
> > index 92c30879bf67..de1da56d2c07 100644
> > --- a/mm/Kconfig
> > +++ b/mm/Kconfig
> > @@ -59,6 +59,18 @@ config ZSWAP_EXCLUSIVE_LOADS
> >           The cost is that if the page was never dirtied and needs to be
> >           swapped out again, it will be re-compressed.
> >
> > +config ZSWAP_NR_ZPOOLS_ORDER
> > +       int "Number of zpools in zswap, as power of 2"
> > +       default 0
> > +       depends on ZSWAP
> > +       help
> > +         This options determines the number of zpools to use for zswap, it
>
> option

Thanks for taking a look. Will correct both in v3 (if any). Otherwise,
I hope Andrew will fix them in-place :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ