From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Nhat Pham <nphamcs@gmail.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>,
Yosry Ahmed <yosryahmed@google.com>,
akpm@linux-foundation.org, hannes@cmpxchg.org,
cerasuolodomenico@gmail.com, sjenning@redhat.com,
ddstreet@ieee.org, vitaly.wool@konsulko.com, 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, david@ixit.cz,
Minchan Kim <minchan@kernel.org>,
Shakeel Butt <shakeel.butt@linux.dev>,
Chengming Zhou <chengming.zhou@linux.dev>,
Kairui Song <ryncsn@gmail.com>
Subject: Re: [PATCH 0/2] minimize swapping on zswap store failure
Date: Fri, 4 Apr 2025 10:46:22 +0900 [thread overview]
Message-ID: <fqj732chhrffec5hrvg5f7i5hqidgpdetldolyubj25jczq7ec@wj4bwu7psbwh> (raw)
In-Reply-To: <CAKEwX=Na6kgGLsnknkfsc75hk-Q690z0J9rh=S=BmK2qjVU3rw@mail.gmail.com>
On (25/04/03 13:38), Nhat Pham wrote:
> > Ultimately the goal is to prevent an incompressible page from hoarding the
> > compression algorithm on multiple reclaim attempts, but if we are spending
> > more time by allocating new pages... maybe this isn't the correct approach :(
>
> Hmmm, IIUC this problem also exists with zram, since zram allocates a
> PAGE_SIZE sized buffer to hold the original page's content. I will
> note though that zram seems to favor these kinds of pages for
> writeback :) Maybe this is why...?
zram is a generic block device, it must store whatever comes in,
compressible or incompressible. E.g. when we have, say, ext4
running atop of the zram device we cannot reject page stores.
And you are right, when we use zram for swap, there is some benefit
in storing incompressible pages. First, those pages are candidates
for zram writeback, which achieves the goal of removing the page from
RAM after all, we give up on the incompressible page reclamation with
"return it back to LRU" approach. Second, on some zram setups we do
re-compression (with a slower and more efficient algorithm) and in
certain number of cases what is incompressible with the primary (fast)
algorithm is compressible with the secondary algorithm.
next prev parent reply other threads:[~2025-04-04 1:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 0:35 Nhat Pham
2023-10-17 0:35 ` [PATCH 1/2] swap: allows swap bypassing " Nhat Pham
2023-10-17 0:35 ` [PATCH 2/2] zswap: store uncompressed pages when compression algorithm fails Nhat Pham
2023-10-17 0:57 ` [PATCH 0/2] minimize swapping on zswap store failure Yosry Ahmed
2023-10-17 4:47 ` Johannes Weiner
2023-10-17 5:33 ` Yosry Ahmed
2023-10-17 14:51 ` Johannes Weiner
2023-10-17 15:51 ` Yosry Ahmed
2023-10-17 19:24 ` Nhat Pham
2023-10-17 19:03 ` Nhat Pham
2023-10-17 19:04 ` Nhat Pham
2025-04-02 20:06 ` Joshua Hahn
2025-04-03 20:38 ` Nhat Pham
2025-04-04 1:46 ` Sergey Senozhatsky [this message]
2025-04-04 14:06 ` Joshua Hahn
2025-04-04 15:29 ` Nhat Pham
2025-04-08 3:33 ` Sergey Senozhatsky
2025-04-04 15:39 ` Nhat Pham
2025-04-22 11:27 ` Yosry Ahmed
2025-04-22 15:00 ` Joshua Hahn
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=fqj732chhrffec5hrvg5f7i5hqidgpdetldolyubj25jczq7ec@wj4bwu7psbwh \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=cerasuolodomenico@gmail.com \
--cc=chengming.zhou@linux.dev \
--cc=corbet@lwn.net \
--cc=david@ixit.cz \
--cc=ddstreet@ieee.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=nphamcs@gmail.com \
--cc=rppt@kernel.org \
--cc=ryncsn@gmail.com \
--cc=shakeel.butt@linux.dev \
--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