lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGsJ_4zeqWSZP_xujhbWvjK_jUsPrJDJJ4j4QSgjfUvYtqP+mw@mail.gmail.com>
Date: Tue, 2 Dec 2025 02:00:40 +0800
From: Barry Song <21cnbao@...il.com>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Richard Chang <richardycc@...gle.com>, 
	Brian Geffon <bgeffon@...gle.com>, Minchan Kim <minchan@...nel.org>, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org, linux-block@...r.kernel.org, 
	Minchan Kim <minchan@...gle.com>
Subject: Re: [PATCH 1/2] zram: introduce compressed data writeback

On Mon, Dec 1, 2025 at 5:09 PM Sergey Senozhatsky
<senozhatsky@...omium.org> wrote:
>
> On (25/12/01 16:59), Barry Song wrote:
> > On Mon, Dec 1, 2025 at 11:56 AM Sergey Senozhatsky
> > <senozhatsky@...omium.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ