linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chris Li <chriscli@google.com>
To: Nhat Pham <nphamcs@gmail.com>
Cc: akpm@linux-foundation.org, tj@kernel.org,
	lizefan.x@bytedance.com,  hannes@cmpxchg.org,
	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
Subject: Re: [PATCH v6] zswap: memcontrol: implement zswap writeback disabling (fix)
Date: Sun, 24 Dec 2023 09:17:54 -0800	[thread overview]
Message-ID: <CAF8kJuMQhbkR2p0UZ61r+tAGg-idiSMoW8Gsf=GcB3Jpa=W9qw@mail.gmail.com> (raw)
In-Reply-To: <20231221005725.3446672-1-nphamcs@gmail.com>

Hi Nhat,

Acked-by: Chris Li <chrisl@kernel.org>

I think a follow up step would be having some patches to address it
rather than document it that oh yes, we have a problem in that
situation.

Chris

On Wed, Dec 20, 2023 at 4:57 PM Nhat Pham <nphamcs@gmail.com> wrote:
>
> Add a caveat about recurring zswap store failures leading to reclaim
> inefficiency.
>
> Suggested-by: Yosry Ahmed <yosryahmed@google.com>
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>
> ---
>  Documentation/admin-guide/cgroup-v2.rst | 5 ++++-
>  Documentation/admin-guide/mm/zswap.rst  | 4 ++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 2b4ac43efdc8..5ec7dd753cd1 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1686,7 +1686,10 @@ PAGE_SIZE multiple when read back.
>
>         When this is set to 0, all swapping attempts to swapping devices
>         are disabled. This included both zswap writebacks, and swapping due
> -       to zswap store failure.
> +       to zswap store failures. If the zswap store failures are recurring
> +       (for e.g if the pages are incompressible), users can observe
> +       reclaim inefficiency after disabling writeback (because the same
> +       pages might be rejected again and again).
>
>         Note that this is subtly different from setting memory.swap.max to
>         0, as it still allows for pages to be written to the zswap pool.
> diff --git a/Documentation/admin-guide/mm/zswap.rst b/Documentation/admin-guide/mm/zswap.rst
> index cfa653130346..b42132969e31 100644
> --- a/Documentation/admin-guide/mm/zswap.rst
> +++ b/Documentation/admin-guide/mm/zswap.rst
> @@ -159,6 +159,10 @@ zswap itself) on a cgroup-basis as follows:
>
>         echo 0 > /sys/fs/cgroup/<cgroup-name>/memory.zswap.writeback
>
> +Note that if the store failures are recurring (for e.g if the pages are
> +incompressible), users can observe reclaim inefficiency after disabling
> +writeback (because the same pages might be rejected again and again).
> +
>  When there is a sizable amount of cold memory residing in the zswap pool, it
>  can be advantageous to proactively write these cold pages to swap and reclaim
>  the memory for other use cases. By default, the zswap shrinker is disabled.
> --
> 2.34.1
>


      reply	other threads:[~2023-12-24 17:18 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 19:24 [PATCH v6] zswap: memcontrol: implement zswap writeback disabling 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
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 [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='CAF8kJuMQhbkR2p0UZ61r+tAGg-idiSMoW8Gsf=GcB3Jpa=W9qw@mail.gmail.com' \
    --to=chriscli@google.com \
    --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=hughd@google.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=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