linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chris Li <chrisl@kernel.org>
To: Nhat Pham <nphamcs@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	akpm@linux-foundation.org, tj@kernel.org,
	 lizefan.x@bytedance.com, cerasuolodomenico@gmail.com,
	yosryahmed@google.com,  sjenning@redhat.com, ddstreet@ieee.org,
	vitaly.wool@konsulko.com,  mhocko@kernel.org,
	roman.gushchin@linux.dev, shakeelb@google.com,
	 muchun.song@linux.dev, hughd@google.com, corbet@lwn.net,
	 konrad.wilk@oracle.com, senozhatsky@chromium.org,
	rppt@kernel.org,  linux-mm@kvack.org, kernel-team@meta.com,
	linux-kernel@vger.kernel.org,  linux-doc@vger.kernel.org,
	david@ixit.cz, Kairui Song <kasong@tencent.com>,
	 Minchan Kim <minchan@google.com>,
	Zhongkun He <hezhongkun.hzk@bytedance.com>
Subject: Re: [PATCH v6] zswap: memcontrol: implement zswap writeback disabling
Date: Tue, 12 Dec 2023 16:29:08 -0800	[thread overview]
Message-ID: <CAF8kJuO4-yQY9DkKm+1dvqA+QzPyCtCStoLJ4MEVNwbrBQRTLw@mail.gmail.com> (raw)
In-Reply-To: <CAKEwX=OPQE3eTsfqwQa-bq3NE5YcqnkKfud84+FV4HF-Q_wcTg@mail.gmail.com>

On Tue, Dec 12, 2023 at 1:36 PM Nhat Pham <nphamcs@gmail.com> wrote:

> > Even if such a file were to show up, I'm not convinced it should even
> > include zswap as one of the tiers. Zswap isn't a regular swap backend,
> > it doesn't show up in /proc/swaps, it can't be a second tier, the way
> > it interacts with its backend file is very different than how two
> > swapfiles of different priorities interact with each other, it's
> > already controllable with memory.zswap.max, etc.
>
> This is honestly the thing I was originally most iffy about :) zswap
> is architecturally and semantically separate from other swap options.
> It gets really confusing to lump it as part of the swap tiers.

The writeback option is about interacting with other swap backends. So
technically it is not zswap alone. writeback = 0 will disable SSD swap
as well.
I am not against merging the write back. I just want to make sure 1)
better alternatives can be developed 2) zswap.writeback can obsolete
if a better alternative is available.

>
> >
> > I'm open to discussing usecases and proposals for more fine-grained
> > per-cgroup backend control. We've had discussions about per-cgroup
> > swapfiles in the past. Cgroup parameters for swapon are another
> > thought. There are several options and many considerations. The
> > memory.swap.tiers idea is the newest, has probably had the least
> > amount of discussion among them, and looks the least convincing to me.
>
> Definitely. zswap.writeback is a really concrete feature, with
> immediate use-case, whereas swap.tiers seem a bit nebulous to me now,
> the more we discuss it. I'm not against the inclusion of something
> along its line though, and I'm definitely not trying to limit the use
> case of other folks - I'd be happy to contribute my engineering hours
> towards the discussion of the multi-tier swapping design (both
> internal implementation and and public interface), as well as actual
> code, when that design is fully fleshed out :)

Great to hear that. I think the discussion so far shows the
alternative usage cases of the swap backend/tires is real.

>
> >
> > Let's work out the requirements first.
> >
> > The "conflict" with memory.zswap.writeback is a red herring - it's no
> > more of a conflict than setting memory.swap.tiers to "zswap" or "all"
> > and then setting memory.zswap.max or memory.swap.max to 0.
>
> Yup.

Care to elaborate it more? I don't understand the conflict part. I do
ask Johannes in my previous email for clarification.
One is the superset of the other. I don't consider that as a conflict.
If we can have both to choose from, obviously I would pick the one
that is more general and flexible.

Chris


  reply	other threads:[~2023-12-13  0:29 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 19:24 Nhat Pham
2023-12-07 19:26 ` Yosry Ahmed
2023-12-07 22:11 ` Andrew Morton
2023-12-08  0:42   ` Nhat Pham
2023-12-08  1:14     ` Nhat Pham
2023-12-08 19:58       ` Andrew Morton
2023-12-08 19:57     ` Andrew Morton
2023-12-08  0:19 ` Chris Li
2023-12-08  1:03   ` Nhat Pham
2023-12-08  1:12     ` Yosry Ahmed
2023-12-08 16:34       ` Johannes Weiner
2023-12-08 20:08         ` Yosry Ahmed
2023-12-09  2:02         ` Chris Li
2023-12-09  0:09       ` Chris Li
2023-12-08 23:55     ` Chris Li
2023-12-09  3:42       ` Johannes Weiner
2023-12-09 17:39         ` Chris Li
2023-12-11 22:55         ` Minchan Kim
2023-12-12  2:43           ` [External] " Zhongkun He
2023-12-12 23:57           ` Chris Li
2023-12-20 10:22             ` Kairui Song
2023-12-14 17:11           ` Johannes Weiner
2023-12-14 17:23             ` Yu Zhao
2023-12-14 18:00               ` Fabian Deutsch
2023-12-14 23:22                 ` Chris Li
2023-12-15  7:42                   ` Fabian Deutsch
2023-12-15  9:40                     ` Chris Li
2023-12-15  9:50                       ` Fabian Deutsch
2023-12-15  9:18                   ` Fabian Deutsch
2023-12-14 18:03               ` Fabian Deutsch
2023-12-14 17:34             ` Christopher Li
2023-12-14 22:11               ` Johannes Weiner
2023-12-14 22:54                 ` Chris Li
2023-12-15  2:19                   ` Nhat Pham
2023-12-12 21:36         ` Nhat Pham
2023-12-13  0:29           ` Chris Li [this message]
2023-12-11  9:31       ` Kairui Song
2023-12-12 23:39         ` Chris Li
2023-12-20 10:21           ` Kairui Song
2023-12-15 21:21 ` Yosry Ahmed
2023-12-18 14:44   ` Johannes Weiner
2023-12-18 19:21     ` Nhat Pham
2023-12-18 21:54       ` Yosry Ahmed
2023-12-18 21:52     ` Yosry Ahmed
2023-12-20  5:15       ` Johannes Weiner
2023-12-20  8:59         ` Yosry Ahmed
2023-12-20 14:50           ` Johannes Weiner
2023-12-21  0:24             ` Yosry Ahmed
2023-12-21  0:50               ` Nhat Pham
2023-12-21  0:57 ` [PATCH v6] zswap: memcontrol: implement zswap writeback disabling (fix) Nhat Pham
2023-12-24 17:17   ` Chris Li

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=CAF8kJuO4-yQY9DkKm+1dvqA+QzPyCtCStoLJ4MEVNwbrBQRTLw@mail.gmail.com \
    --to=chrisl@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cerasuolodomenico@gmail.com \
    --cc=corbet@lwn.net \
    --cc=david@ixit.cz \
    --cc=ddstreet@ieee.org \
    --cc=hannes@cmpxchg.org \
    --cc=hezhongkun.hzk@bytedance.com \
    --cc=hughd@google.com \
    --cc=kasong@tencent.com \
    --cc=kernel-team@meta.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=mhocko@kernel.org \
    --cc=minchan@google.com \
    --cc=muchun.song@linux.dev \
    --cc=nphamcs@gmail.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=shakeelb@google.com \
    --cc=sjenning@redhat.com \
    --cc=tj@kernel.org \
    --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