From: Yosry Ahmed <yosryahmed@google.com>
To: Nhat Pham <nphamcs@gmail.com>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
cerasuolodomenico@gmail.com, sjenning@redhat.com,
ddstreet@ieee.org, vitaly.wool@konsulko.com, linux-mm@kvack.org,
kernel-team@meta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zswap: change zswap's default allocator to zsmalloc
Date: Mon, 11 Sep 2023 11:19:11 -0700 [thread overview]
Message-ID: <CAJD7tkZHWzS5FTjDEDy5WoUrPh1OH78_3XBk2FPYvrUaz7QSew@mail.gmail.com> (raw)
In-Reply-To: <20230908235115.2943486-1-nphamcs@gmail.com>
On Fri, Sep 8, 2023 at 4:51 PM Nhat Pham <nphamcs@gmail.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@gmail.com>
Acked-by: Yosry Ahmed <yosryahmed@google.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
>
next prev parent reply other threads:[~2023-09-11 18:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 23:51 [PATCH] zswap: change zswap's default allocator to zsmalloc Nhat Pham
2023-09-11 16:05 ` Johannes Weiner
2023-09-11 18:19 ` Yosry Ahmed [this message]
2023-09-26 7:29 ` Christoph Hellwig
2023-09-26 20:06 ` Nhat Pham
2023-09-26 21:26 ` Johannes Weiner
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=CAJD7tkZHWzS5FTjDEDy5WoUrPh1OH78_3XBk2FPYvrUaz7QSew@mail.gmail.com \
--to=yosryahmed@google.com \
--cc=akpm@linux-foundation.org \
--cc=cerasuolodomenico@gmail.com \
--cc=ddstreet@ieee.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=sjenning@redhat.com \
--cc=vitaly.wool@konsulko.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;
as well as URLs for NNTP newsgroup(s).