From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Minchan Kim <minchan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Nitin Gupta <ngupta@vflare.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: [PATCHv3 0/8] zram: Support multiple compression streams
Date: Sun, 9 Oct 2022 18:07:12 +0900 [thread overview]
Message-ID: <20221009090720.1040633-1-senozhatsky@chromium.org> (raw)
Hello,
This series 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 deflate 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.
v3:
-- conditionally reschedule during recompression loop so that
we don't stall RCU grace periods
-- fixed a false-positive WARN_ON
v2:
-- rebased
-- mark completely incompressible pages (neither default nor secondary
algorithm can compress them) with a new flag so that we don't attempt
to recompress them all the time
Sergey Senozhatsky (8):
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()
zram: correct typos
Documentation/admin-guide/blockdev/zram.rst | 64 ++-
drivers/block/zram/Kconfig | 52 +++
drivers/block/zram/zcomp.c | 6 +-
drivers/block/zram/zcomp.h | 2 +-
drivers/block/zram/zram_drv.c | 441 +++++++++++++++++---
drivers/block/zram/zram_drv.h | 16 +-
6 files changed, 510 insertions(+), 71 deletions(-)
--
2.38.0.rc1.362.ged0d419d3c-goog
next reply other threads:[~2022-10-09 9:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-09 9:07 Sergey Senozhatsky [this message]
2022-10-09 9:07 ` [PATCHv3 1/8] zram: Preparation for multi-zcomp support Sergey Senozhatsky
2022-10-09 9:07 ` [PATCHv3 2/8] zram: Add recompression algorithm sysfs knob Sergey Senozhatsky
2022-10-09 9:07 ` [PATCHv3 3/8] zram: Factor out WB and non-WB zram read functions Sergey Senozhatsky
2022-10-09 9:07 ` [PATCHv3 4/8] zram: Introduce recompress sysfs knob Sergey Senozhatsky
2022-10-18 0:08 ` Andrew Morton
2022-10-18 2:12 ` Sergey Senozhatsky
2022-10-18 2:42 ` Sergey Senozhatsky
2022-10-09 9:07 ` [PATCHv3 5/8] documentation: Add recompression documentation Sergey Senozhatsky
2022-10-18 2:22 ` Sergey Senozhatsky
2022-10-18 3:11 ` Andrew Morton
2022-10-18 2:50 ` Sergey Senozhatsky
2022-10-09 9:07 ` [PATCHv3 6/8] zram: Add recompression algorithm choice to Kconfig Sergey Senozhatsky
2022-10-18 3:07 ` Sergey Senozhatsky
2022-10-09 9:07 ` [PATCHv3 7/8] zram: Add recompress flag to read_block_state() Sergey Senozhatsky
2022-10-09 9:07 ` [PATCHv3 8/8] zram: correct typos Sergey Senozhatsky
2022-10-18 0:08 ` Andrew Morton
2022-10-18 2:10 ` Sergey Senozhatsky
2022-10-18 3:11 ` [PATCHv3 0/8] zram: Support multiple compression streams Sergey Senozhatsky
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=20221009090720.1040633-1-senozhatsky@chromium.org \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.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;
as well as URLs for NNTP newsgroup(s).