linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Introduce per-cgroup compression priority
@ 2025-10-26  1:05 jinji zhong
  2025-10-26  1:05 ` [RFC PATCH 1/3] mm/memcontrol: " jinji zhong
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: jinji zhong @ 2025-10-26  1:05 UTC (permalink / raw)
  To: minchan, senozhatsky, philipp.reisner, lars.ellenberg,
	christoph.boehmwalder, corbet, tj, hannes, mkoutny, axboe,
	mhocko, roman.gushchin, shakeel.butt, akpm, terrelln, dsterba
  Cc: muchun.song, linux-kernel, drbd-dev, linux-doc, cgroups,
	linux-block, linux-mm, zhongjinji, liulu.liu, feng.han,
	jinji zhong

Hello everyone,

On Android, different applications have varying tolerance for
decompression latency. Applications with higher tolerance for
decompression latency are better suited for algorithms like ZSTD,
which provides high compression ratio but slower decompression
speed. Conversely, applications with lower tolerance for
decompression latency can use algorithms like LZ4 or LZO that
offer faster decompression but lower compression ratios. For example,
lightweight applications (with few anonymous pages) or applications
without foreground UI typically have higher tolerance for decompression
latency.

Similarly, in memory allocation slow paths or under high CPU
pressure, using algorithms with faster compression speeds might
be more appropriate.

This patch introduces a per-cgroup compression priority mechanism,
where different compression priorities map to different algorithms.
This allows administrators to select appropriate compression
algorithms on a per-cgroup basis.

Currently, this patch is experimental and we would greatly
appreciate community feedback. I'm uncertain whether obtaining
compression priority via get_cgroup_comp_priority in zram is the
best approach. While this implementation is convenient, it seems
somewhat unusual. Perhaps the next step should be to pass
compression priority through page->private.

jinji zhong (3):
  mm/memcontrol: Introduce per-cgroup compression priority
  zram: Zram supports per-cgroup compression priority
  Doc: Update documentation for per-cgroup compression priority

 Documentation/admin-guide/blockdev/zram.rst | 18 +++--
 Documentation/admin-guide/cgroup-v2.rst     |  7 ++
 drivers/block/zram/zram_drv.c               | 74 ++++++++++++++++++---
 drivers/block/zram/zram_drv.h               |  2 +
 include/linux/memcontrol.h                  | 19 ++++++
 mm/memcontrol.c                             | 31 +++++++++
 6 files changed, 139 insertions(+), 12 deletions(-)

-- 
2.48.1



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

end of thread, other threads:[~2025-10-30 11:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-26  1:05 [RFC PATCH 0/3] Introduce per-cgroup compression priority jinji zhong
2025-10-26  1:05 ` [RFC PATCH 1/3] mm/memcontrol: " jinji zhong
2025-10-26  1:05 ` [RFC PATCH 2/3] zram: Zram supports " jinji zhong
2025-10-26  1:05 ` [RFC PATCH 3/3] Doc: Update documentation for " jinji zhong
2025-10-27 16:06 ` [RFC PATCH 0/3] Introduce " Tejun Heo
2025-10-30  9:22   ` zhongjinji
2025-10-27 17:29 ` Shakeel Butt
2025-10-30 11:32   ` zhongjinji
2025-10-27 22:46 ` Nhat Pham
2025-10-28  3:31   ` Sergey Senozhatsky

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