Linux block layer
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] zsmalloc: replace shrinker with deferred compaction
@ 2026-12-03 10:13 Sergey Senozhatsky
  2026-12-03 10:13 ` [RFC PATCH 1/4] mm/zsmalloc: remove shrinker Sergey Senozhatsky
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sergey Senozhatsky @ 2026-12-03 10:13 UTC (permalink / raw)
  To: Andrew Morton, Yosry Ahmed, Nhat Pham, Barry Song
  Cc: Brian Geffon, Minchan Kim, Richard Chang, Johannes Weiner,
	Chengming Zhou, Xueyuan Chen, Xueyuan Chen, Nanzhe Zhao,
	linux-kernel, linux-block, linux-mm, Sergey Senozhatsky

This is a follow-up to Chris's shrinker removal patch [1] and Barry's
Pixel 6 fragmentation numbers [2].

Removing the shrinker avoids mid-swap compaction stalls, but without
any automatic compaction we risk regressing memory footprint on systems
that do not run a userspace compaction daemon, and on systems that do
proactive swap-out without hitting memory pressure (no shrinker
triggers).

Replace shrinker callbacks (now removed) with deferred threshold-based
compaction in zsmalloc (plus a runtime-tunable zram sysfs knob to
configure or disable it).

Link: https://lore.kernel.org/linux-kernel/18ed2967f99a2eff.3137322e32332e3235332e313736.2c2157.0000sendgmr@google.com [1]
Link: https://lore.kernel.org/linux-kernel/CAGsJ_4yoogQHpxGigawTfMPEKL_A6OkfEfsmJHzDHLPS3FCUQg@mail.gmail.com [2]

Chris Wiseman (1):
  mm/zsmalloc: remove shrinker

Sergey Senozhatsky (3):
  zsmalloc: introduce lockless zs_class_can_compact()
  zsmalloc: add deferred threshold compaction
  zram: add compact_threshold sysfs attribute

 Documentation/ABI/testing/sysfs-block-zram  |   9 ++
 Documentation/admin-guide/blockdev/zram.rst |   2 +
 drivers/block/zram/zram_drv.c               |  45 +++++++
 drivers/block/zram/zram_drv.h               |   1 +
 include/linux/zsmalloc.h                    |   3 +
 mm/zsmalloc.c                               | 136 ++++++++++++--------
 6 files changed, 142 insertions(+), 54 deletions(-)

-- 
2.56.1.987.g2ec0ab4260-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-12-04  3:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 10:13 [RFC PATCH 0/4] zsmalloc: replace shrinker with deferred compaction Sergey Senozhatsky
2026-12-03 10:13 ` [RFC PATCH 1/4] mm/zsmalloc: remove shrinker Sergey Senozhatsky
2026-12-03 10:13 ` [RFC PATCH 2/4] zsmalloc: introduce lockless zs_class_can_compact() Sergey Senozhatsky
2026-12-04  2:55 ` [RFC PATCH 0/4] zsmalloc: replace shrinker with deferred compaction Xueyuan Chen
2026-12-04  3:49   ` Sergey Senozhatsky
2026-12-04  3:51 ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox