Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Barry Song <baohua@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	 Chris Wiseman <chriswiseman@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Minchan Kim <minchan@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 Yosry Ahmed <yosry@kernel.org>, Nhat Pham <nphamcs@gmail.com>,
	 Chengming Zhou <chengming.zhou@linux.dev>,
	Xueyuan Chen <xueyuan.chen21@gmail.com>,
	 Xueyuan Chen <xueyuan.chen@vivo.com>,
	Brian Geffon <bgeffon@google.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/zsmalloc: remove shrinker
Date: Thu, 3 Dec 2026 12:08:27 +0900	[thread overview]
Message-ID: <axDcRh5HUDWJQXfe@google.com> (raw)
In-Reply-To: <CAGsJ_4yuP2KhSnPzn00h9qDSjqTcs=QXmQvCbNWUPvSF9ezaVw@mail.gmail.com>

Hi Barry,

On (26/12/02 18:21), Barry Song wrote:
> > > Hi Chris, Xueyuan and all,
> > >
> > > Thanks for the patch and the report. Just curious, do we need
> > > userspace-triggered proactive compaction
> >
> > Wouldn't hurt to keep it around, I guess.  But maybe can NOOP it
> > in the future (removing zram device attributes is a bit difficult,
> > we usually give around 3-5 years of deprecation cooldown period
> > before removal.)
> 
> Hi Sergey,
> 
> Thanks for your reply. Sorry, I might not have expressed my question
> clearly. Here is what I meant:

Oh, my bad!

> We used to have automatic compaction through the shrinker. Now that
> we have removed it, do we still expect compaction to be triggered,
> either automatically or manually by writing to the zram sysfs
> attribute?
> 
> I know the changelog already says:
> 
> " Testing on ARM64 QEMU shows that removing the shrinker eliminates
>  mid-swap compaction churn without increasing active pool memory
>  usage for either zram or zswap."
> 
> But what about periods when swap-out is not active? Would compaction
> still be beneficial in those cases?

I suppose compaction will be beneficial after a huge app swap-in, e.g.
bringing back a web browser with (usual) million tabs.  Or after a huge
app kill/termination, if the app had swap presence.  Both of these
release memory from zsmalloc and create fragmentation, so we might
benefit from doing a de-fragmentation.


  parent reply	other threads:[~2026-12-03  3:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 15:02 [PATCH] mm/zsmalloc: remove shrinker Chris Wiseman
2026-12-01 16:45 ` Nhat Pham
2026-12-01 16:53 ` Yosry Ahmed
2026-12-02  0:46 ` Xueyuan Chen
2026-12-02  2:09 ` Sergey Senozhatsky
2026-12-02  7:04 ` Barry Song
2026-12-02  8:14   ` Sergey Senozhatsky
2026-12-02 10:21     ` Barry Song
2026-12-02 16:17       ` Chris Wiseman
2026-12-03  3:08       ` Sergey Senozhatsky [this message]
2026-12-03  3:24         ` Barry Song

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=axDcRh5HUDWJQXfe@google.com \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=bgeffon@google.com \
    --cc=chengming.zhou@linux.dev \
    --cc=chriswiseman@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=nphamcs@gmail.com \
    --cc=xueyuan.chen21@gmail.com \
    --cc=xueyuan.chen@vivo.com \
    --cc=yosry@kernel.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