From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Chris Wiseman <chriswiseman@google.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Barry Song <baohua@kernel.org>, Nanzhe Zhao <nzzhao@126.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 13:58:20 +0900 [thread overview]
Message-ID: <axD1mD2liCtT5rfN@google.com> (raw)
In-Reply-To: <18eda4bfd6c242a5.3137322e32332e3235332e313736.202733.0000sendgmr@google.com>
On (26/12/03 04:42), Chris Wiseman wrote:
> Hi Sergey, Barry, Nanzhe, Andrew,
>
> Barry, Nanzhe, thanks for the Pixel 6 numbers. 32 MB to 182 MB median
> (622 MB peak) is a real regression, so the shrinker removal shouldn't go
> in alone.
>
> Sergey, moving compaction to a background worker gated on
> zs_pool_can_compact() looks good to me. Three quick things on the
> sketch:
>
> 1. Can we make compact_threshold writable after init (like mem_limit)
> instead of returning -EBUSY? Android needs to tune it live without
> resetting zram. That'll just need WRITE_ONCE() in the store and
> READ_ONCE() in zram_schedule_compaction(), since slot_free() doesn't
> hold dev_lock.
Sure. I didn't want to complicate the patch. It can be run-time
tunable.
> 2. If it defaults to 0, removing the shrinker regresses anyone who
> doesn't know the knob exists. We should pick a non-zero default from
> data rather than guessing. Barry, Nanzhe, could you test 5 and 10 on
> that same Pixel 6 loop?
Right. I guess 5 is a good default.
> 3. The 10-second timer doesn't know about memory pressure, whereas the
> shrinker ran when reclaim wanted pages. Not a blocker, just the first
> thing I'd watch if the Pixel numbers don't come back down.
So that 10 seconds cooldown is there because those slot-free calls don't
come alone, usually. It's more likely to be a burst of slot-free's and
10 seconds wait kind of tries to space them (burst and compaction) out.
> Andrew, please drop mm-zsmalloc-remove-shrinker.patch from mm-new for
> now. Once we have the Pixel 6 numbers, we can send a 2-patch series
> with Sergey's patch first and the shrinker removal second so git bisect
> doesn't hit a regressing commit. Sergey, happy to carry your patch or
> rebase mine on top of yours, whichever you prefer.
I think your patch will go in as is, no need to rebase, the remaining
work will stack on top of it. I guess we want shrinker replacement,
just need to figure out what do we replace it with.
next prev parent reply other threads:[~2026-12-03 4:58 UTC|newest]
Thread overview: 16+ 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-03 3:08 ` Sergey Senozhatsky
2026-12-03 3:24 ` Barry Song
2026-12-03 3:37 ` Sergey Senozhatsky
2026-12-03 4:24 ` Sergey Senozhatsky
2026-12-03 4:42 ` Chris Wiseman
2026-12-03 4:58 ` Sergey Senozhatsky [this message]
2026-12-03 4:52 ` Sergey Senozhatsky
2026-12-03 5:10 ` 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=axD1mD2liCtT5rfN@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=nzzhao@126.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