All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yosry Ahmed <yosryahmed@google.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Nhat Pham <nphamcs@gmail.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	 Huacai Chen <chenhuacai@kernel.org>,
	Minchan Kim <minchan@kernel.org>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	linux-mm@kvack.org, linux-block@vger.kernel.org
Subject: Re: [PATCH 0/5] mm: unify default compressor algorithm for zram/zswap
Date: Thu, 22 Feb 2024 20:46:18 -0800	[thread overview]
Message-ID: <CAJD7tkb0E9pJ=9xMTg4aNcXEscwJwOo--kDfau9YfkwCbcJL1g@mail.gmail.com> (raw)
In-Reply-To: <20240223035548.2591882-1-wangkefeng.wang@huawei.com>

On Thu, Feb 22, 2024 at 7:56 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> Both zram and zswap are used to reduce memory usage by compressing cold
> page, a default compressor algorithm is selected from kinds of compressor
> algorithm as the default one from very similar Kconfig, also both of
> them could change the algorithm by sysfs interfaces, so unify the
> default compressor algorithm to cleanup the default algorithm chosen.

Both zswap and zram *can* be used for compressed swap, but zram is a
generic block device that has other use cases, see
https://docs.kernel.org/admin-guide/blockdev/zram.html.

For starters, making zram depend on SWAP may break some of those use cases.

Otherwise, I don't immediately see the benefit of unifying the config
options for two independent subsystems just because they both use
"compression". The reduction of the config options is nice, but in
this case I am not sure it's doing more good than harm. Also, most
people use either zswap or zram in my experience, so they don't really
have to configure both anyway.

>
> Kefeng Wang (5):
>   zram: zcomp: remove zcomp_set_max_streams() declaration
>   zram: make zram depends on SWAP
>   zram: support deflate compressor
>   mm: zswap: default to lzo-rle instead of lzo
>   mm: unify default compressor algorithm for zswap and zram
>
>  Documentation/admin-guide/mm/zswap.rst     |   2 +-
>  arch/loongarch/configs/loongson3_defconfig |   2 +-
>  drivers/block/zram/Kconfig                 |  44 +------
>  drivers/block/zram/zcomp.c                 |   3 +
>  drivers/block/zram/zcomp.h                 |   1 -
>  drivers/block/zram/zram_drv.c              |   2 +-
>  mm/Kconfig                                 | 134 +++++++++++----------
>  mm/zswap.c                                 |   8 +-
>  8 files changed, 83 insertions(+), 113 deletions(-)
>
> --
> 2.27.0
>

  parent reply	other threads:[~2024-02-23  4:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23  3:55 [PATCH 0/5] mm: unify default compressor algorithm for zram/zswap Kefeng Wang
2024-02-23  3:55 ` [PATCH 1/5] zram: zcomp: remove zcomp_set_max_streams() declaration Kefeng Wang
2024-02-23  3:55 ` [PATCH 2/5] zram: make zram depends on SWAP Kefeng Wang
2024-02-23  4:39   ` Sergey Senozhatsky
2024-02-23  3:55 ` [PATCH 3/5] zram: support deflate compressor Kefeng Wang
2024-02-23  3:55 ` [PATCH 4/5] mm: zswap: default to lzo-rle instead of lzo Kefeng Wang
2024-02-23  3:55 ` [PATCH 5/5] mm: unify default compressor algorithm for zswap and zram Kefeng Wang
2024-02-23  4:46 ` Yosry Ahmed [this message]
2024-02-23  6:43   ` [PATCH 0/5] mm: unify default compressor algorithm for zram/zswap Kefeng Wang
2024-02-23  4:51 ` Sergey Senozhatsky
2024-02-23  6:45   ` Kefeng Wang

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='CAJD7tkb0E9pJ=9xMTg4aNcXEscwJwOo--kDfau9YfkwCbcJL1g@mail.gmail.com' \
    --to=yosryahmed@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=chenhuacai@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=nphamcs@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=wangkefeng.wang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.