From: Johannes Weiner <hannes@cmpxchg.org>
To: Nhat Pham <nphamcs@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
akpm@linux-foundation.org, cerasuolodomenico@gmail.com,
yosryahmed@google.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: Tue, 26 Sep 2023 17:26:40 -0400 [thread overview]
Message-ID: <20230926212640.GC348484@cmpxchg.org> (raw)
In-Reply-To: <CAKEwX=O3ydrSKoZKv-6T0QHTEh5WkgRfK3b7Aa_H6GmQbn4QsA@mail.gmail.com>
On Tue, Sep 26, 2023 at 01:06:13PM -0700, Nhat Pham wrote:
> On Tue, Sep 26, 2023 at 12:29 AM Christoph Hellwig <hch@infradead.org> wrote:
> >
> > On Fri, Sep 08, 2023 at 04:51:15PM -0700, Nhat Pham 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.
> >
> > Dumb question from an outside, why do we then even keep the other
> > two allocators around?
> >
>
> Maybe legacy users who explicitly configure zbud/z3fold?
> We have a couple internally, and have to manually undo
> those configuration after we stop compiling these 2
> allocators.
>
> But yeah, I don't see why we should keep these 2 allocators
> around. Time to deprecate them? :)
I agree we should try to get rid of them. The best reason for them I
can come up with is that they're more "lightweight". But I'm not sure
that pans out in practice. Even if loads and stores are marginally
faster, the poor density means you have to reclaim more/hotter anon
pages for the equivalent reduction in memory usage. In most cases this
will increase the overall amount of ongoing paging. That should
quickly dwarve the minor advantage in per-transaction overhead.
We could do something similar as we did for slab and mark them
deprecated for a few cycles:
commit eb07c4f39c3e858a7d0cc4bb15b8a304f83f0497
Author: Vlastimil Babka <vbabka@suse.cz>
Date: Tue May 23 09:06:34 2023 +0200
mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED
Then if nobody complains give them the ax.
prev parent reply other threads:[~2023-09-26 21:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 23:51 Nhat Pham
2023-09-11 16:05 ` Johannes Weiner
2023-09-11 18:19 ` Yosry Ahmed
2023-09-26 7:29 ` Christoph Hellwig
2023-09-26 20:06 ` Nhat Pham
2023-09-26 21:26 ` Johannes Weiner [this message]
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=20230926212640.GC348484@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=cerasuolodomenico@gmail.com \
--cc=ddstreet@ieee.org \
--cc=hch@infradead.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 \
--cc=yosryahmed@google.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