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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJD7tkZHWzS5FTjDEDy5WoUrPh1OH78_3XBk2FPYvrUaz7QSew@mail.gmail.com>
Date:   Mon, 11 Sep 2023 11:19:11 -0700
From:   Yosry Ahmed <yosryahmed@...gle.com>
To:     Nhat Pham <nphamcs@...il.com>
Cc:     akpm@...ux-foundation.org, hannes@...xchg.org,
        cerasuolodomenico@...il.com, sjenning@...hat.com,
        ddstreet@...e.org, vitaly.wool@...sulko.com, linux-mm@...ck.org,
        kernel-team@...a.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] zswap: change zswap's default allocator to zsmalloc

On Fri, Sep 8, 2023 at 4:51 PM Nhat Pham <nphamcs@...il.com> wrote:
>
> Out of zswap's 3 allocators, zsmalloc is the clear superior in terms of
> memory utilization, both in theory and as observed in practice, with its
> high storage density and low internal fragmentation. zsmalloc is also
> more actively developed and maintained, since it is the allocator of
> choice for zswap for many users, as well as the only allocator for zram.
>
> A historical objection to the selection of zsmalloc as the default
> allocator for zswap is its lack of writeback capability. However, this
> has changed, with the zsmalloc writeback patchset, and the subsequent
> zswap LRU refactor. With this, there is not a lot of good reasons to
> keep zbud, an otherwise inferior allocator, as the default instead of
> zswap.
>
> This patch changes the default allocator to zsmalloc. The only exception
> is on settings without MMU, in which case zbud will remain as the
> default.
>
> Signed-off-by: Nhat Pham <nphamcs@...il.com>

Acked-by: Yosry Ahmed <yosryahmed@...gle.com>

> ---
>  mm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 721dc88423c7..e0217deca084 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -130,6 +130,7 @@ config ZSWAP_COMPRESSOR_DEFAULT
>  choice
>         prompt "Default allocator"
>         depends on ZSWAP
> +       default ZSWAP_ZPOOL_DEFAULT_ZSMALLOC if MMU
>         default ZSWAP_ZPOOL_DEFAULT_ZBUD
>         help
>           Selects the default allocator for the compressed cache for
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ