linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/7] zram: Support multiple compression streams
@ 2022-09-05  8:15 Sergey Senozhatsky
  2022-09-05  8:15 ` [PATCH 1/3] documentation: Add recompression documentation Sergey Senozhatsky
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Sergey Senozhatsky @ 2022-09-05  8:15 UTC (permalink / raw)
  To: Minchan Kim, Andrew Morton
  Cc: Nitin Gupta, linux-kernel, linux-mm, Sergey Senozhatsky

Hello,

	RFC series that adds support for multiple (per-CPU)
compression streams (at point only 2). The main idea is that
different compression algorithms have different characteristics
and zram may benefit when it uses a combination of algorithms:
a default algorithm that is faster but have lower compression
rate and a secondary algorithm that can use higher compression
rate at a price of slower compression/decompression.

	There are several use-case for this functionality:

- huge pages re-compression: zstd or defalte can successfully
compress huge pages (~50% of huge pages on my synthetic ChromeOS
tests), IOW pages that lzo was not able to compress.

- idle pages re-compression: idle/cold pages sit in the memory
and we may reduce zsmalloc memory usage if we recompress those
idle pages.

	User-space has a number of ways to control the behavior
and impact of zram recompression: what type of pages should be
recompressed, size watermarks, etc. Please refer to documentation
patch.

Sergey Senozhatsky (7):
  zram: Preparation for multi-zcomp support
  zram: Add recompression algorithm sysfs knob
  zram: Factor out WB and non-WB zram read functions
  zram: Introduce recompress sysfs knob
  documentation: Add recompression documentation
  zram: Add recompression algorithm choice to Kconfig
  zram: Add recompress flag to read_block_state()

 Documentation/admin-guide/blockdev/zram.rst |  64 ++-
 drivers/block/zram/Kconfig                  |  51 +++
 drivers/block/zram/zcomp.c                  |   6 +-
 drivers/block/zram/zcomp.h                  |   2 +-
 drivers/block/zram/zram_drv.c               | 432 +++++++++++++++++---
 drivers/block/zram/zram_drv.h               |  15 +-
 6 files changed, 504 insertions(+), 66 deletions(-)

-- 
2.37.2.789.g6183377224-goog



^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH RFC 0/7] zram: Support multiple compression streams
@ 2022-09-05  8:23 Sergey Senozhatsky
  2022-09-05  8:23 ` [PATCH RFC 4/7] zram: Introduce recompress sysfs knob Sergey Senozhatsky
  0 siblings, 1 reply; 19+ messages in thread
From: Sergey Senozhatsky @ 2022-09-05  8:23 UTC (permalink / raw)
  To: Minchan Kim, Andrew Morton
  Cc: Nitin Gupta, linux-kernel, linux-mm, Sergey Senozhatsky

Hello,

	RFC series that adds support for multiple (per-CPU)
compression streams (at point only 2). The main idea is that
different compression algorithms have different characteristics
and zram may benefit when it uses a combination of algorithms:
a default algorithm that is faster but have lower compression
rate and a secondary algorithm that can use higher compression
rate at a price of slower compression/decompression.

	There are several use-case for this functionality:

- huge pages re-compression: zstd or defalte can successfully
compress huge pages (~50% of huge pages on my synthetic ChromeOS
tests), IOW pages that lzo was not able to compress.

- idle pages re-compression: idle/cold pages sit in the memory
and we may reduce zsmalloc memory usage if we recompress those
idle pages.

	User-space has a number of ways to control the behavior
and impact of zram recompression: what type of pages should be
recompressed, size watermarks, etc. Please refer to documentation
patch.


Sergey Senozhatsky (7):
  zram: Preparation for multi-zcomp support
  zram: Add recompression algorithm sysfs knob
  zram: Factor out WB and non-WB zram read functions
  zram: Introduce recompress sysfs knob
  documentation: Add recompression documentation
  zram: Add recompression algorithm choice to Kconfig
  zram: Add recompress flag to read_block_state()

 Documentation/admin-guide/blockdev/zram.rst |  64 ++-
 drivers/block/zram/Kconfig                  |  51 +++
 drivers/block/zram/zcomp.c                  |   6 +-
 drivers/block/zram/zcomp.h                  |   2 +-
 drivers/block/zram/zram_drv.c               | 432 +++++++++++++++++---
 drivers/block/zram/zram_drv.h               |  15 +-
 6 files changed, 504 insertions(+), 66 deletions(-)

-- 
2.37.2.789.g6183377224-goog



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

end of thread, other threads:[~2022-09-12 10:05 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05  8:15 [PATCH RFC 0/7] zram: Support multiple compression streams Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH 1/3] documentation: Add recompression documentation Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH RFC 1/7] zram: Preparation for multi-zcomp support Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH 2/3] zram: Add recompression algorithm choice to Kconfig Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH RFC 2/7] zram: Add recompression algorithm sysfs knob Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH 3/3] zram: Add recompress flag to read_block_state() Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH RFC 3/7] zram: Factor out WB and non-WB zram read functions Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH RFC 4/7] zram: Introduce recompress sysfs knob Sergey Senozhatsky
2022-09-05  9:21   ` Barry Song
2022-09-05  9:53     ` Sergey Senozhatsky
2022-09-05 10:06       ` Barry Song
2022-09-05 10:17         ` Sergey Senozhatsky
2022-09-05 21:27           ` Barry Song
2022-09-05  8:15 ` [PATCH RFC 5/7] documentation: Add recompression documentation Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH RFC 6/7] zram: Add recompression algorithm choice to Kconfig Sergey Senozhatsky
2022-09-05  8:15 ` [PATCH RFC 7/7] zram: Add recompress flag to read_block_state() Sergey Senozhatsky
2022-09-05  8:21 ` [PATCH RFC 0/7] zram: Support multiple compression streams Sergey Senozhatsky
2022-09-05  8:23 Sergey Senozhatsky
2022-09-05  8:23 ` [PATCH RFC 4/7] zram: Introduce recompress sysfs knob Sergey Senozhatsky
2022-09-12 10:05   ` Sergey Senozhatsky

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