From: Barry Song <21cnbao@gmail.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Richard Chang <richardycc@google.com>,
Brian Geffon <bgeffon@google.com>,
Minchan Kim <minchan@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-block@vger.kernel.org, Minchan Kim <minchan@google.com>
Subject: Re: [PATCH 1/2] zram: introduce compressed data writeback
Date: Tue, 2 Dec 2025 02:00:40 +0800 [thread overview]
Message-ID: <CAGsJ_4zeqWSZP_xujhbWvjK_jUsPrJDJJ4j4QSgjfUvYtqP+mw@mail.gmail.com> (raw)
In-Reply-To: <dt632m4jh2jt5fhnddcbgtdndxh6552hcbwpqeklfx6z7oaihz@lnhskip6whc6>
On Mon, Dec 1, 2025 at 5:09 PM Sergey Senozhatsky
<senozhatsky@chromium.org> wrote:
>
> On (25/12/01 16:59), Barry Song wrote:
> > On Mon, Dec 1, 2025 at 11:56 AM Sergey Senozhatsky
> > <senozhatsky@chromium.org> wrote:
> > [...]
> > > > > zram stores all written back slots raw, which implies that
> > > > > during writeback zram first has to decompress slots (except
> > > > > for ZRAM_HUGE slots, which are raw already). The problem
> > > > > with this approach is that not every written back page gets
> > > > > read back (either via read() or via page-fault), which means
> > > > > that zram basically wastes CPU cycles and battery decompressing
> > > > > such slots. This changes with introduction of decompression
> > > >
> > > > If a page is swapped out and never read again, does that actually indicate
> > > > a memory leak in userspace?
> > >
> > > No, it just means that there is no page-fault on that page. E.g. we
> > > swapped out an unused browser tab and never come back to it within the
> > > session: e.g. user closed the tab/app, or logged out of session, or
> > > rebooted the device, or simply powered off (desktop/laptop).
> >
> > Thanks, Sergey. That makes sense to me. On Android, users don’t have a
> > close button, yet apps can still be OOM-killed; those pages are never
> > swapped in.
>
> I see. I suppose on android you still can swipe up and terminate
> un-needed apps, wouldn't this be the same? Well, apart from that,
That’s true, although it’s not typical user behavior :-)
> zram is not android-specific, some distros use it on desktops/laptops
> as well.
Yes, absolutely.
next prev parent reply other threads:[~2025-12-01 18:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 17:04 [PATCH 0/2] " Sergey Senozhatsky
2025-11-28 17:04 ` [PATCH 1/2] " Sergey Senozhatsky
2025-11-29 9:07 ` kernel test robot
2025-12-01 9:10 ` Sergey Senozhatsky
2025-11-29 9:55 ` Barry Song
2025-12-01 3:56 ` Sergey Senozhatsky
2025-12-01 8:59 ` Barry Song
2025-12-01 9:09 ` Sergey Senozhatsky
2025-12-01 18:00 ` Barry Song [this message]
2025-11-28 17:04 ` [PATCH 2/2] zram: rename zram_free_page() Sergey Senozhatsky
2025-12-01 7:39 ` [PATCH 0/2] zram: introduce compressed data writeback Sergey Senozhatsky
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=CAGsJ_4zeqWSZP_xujhbWvjK_jUsPrJDJJ4j4QSgjfUvYtqP+mw@mail.gmail.com \
--to=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bgeffon@google.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@google.com \
--cc=minchan@kernel.org \
--cc=richardycc@google.com \
--cc=senozhatsky@chromium.org \
/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