[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241207035402.GI16709@google.com>
Date: Sat, 7 Dec 2024 12:54:02 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: LiviaMedeiros <9@...no.name>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Minchan Kim <minchan@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Nick Terrell <terrelln@...com>, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org
Subject: Re: [PATCH] zram: make default ZSTD compression level configurable
On (24/12/07 04:16), LiviaMedeiros wrote:
> From: LiviaMedeiros <livia@...no.name>
>
> Add support for configuring the default ZSTD compression level for zram
> devices via the CONFIG_ZRAM_DEFAULT_ZSTD_LEVEL configuration option.
> If this option is not set, fallback to zstd_default_clevel() is used.
Please let's not. Then somebody will need options to .config c/d dicts
for zstd/lz4/lz4hc, acceleration levels for lz4, compression level for
deflate and so on and on and on.
[..]
> I also failed to make something like `echo "algo=zstd level=9" >
> /sys/block/zram3/algorithm_params` work in runtime, but I assume I'm just
> dumb and/or it requires extra steps.
This should work, but you need to configure algo params before you init
zram device (that is _before_ write to disksize device attr).
E.g.
% modprobe zram
% echo zstd > /sys/block/zram0/comp_algorithm
% echo "algo=zstd level=9 dict=/etc/zstd-dict-amd64" > /sys/block/zram0/algorithm_params
% echo 1G > /sys/block/zram0/disksize
Powered by blists - more mailing lists