summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2022-11-09 20:50:36 +0900
committerAndrew Morton <akpm@linux-foundation.org>2022-11-30 15:58:51 -0800
commit001d9273570115b2eb360d5452bbc46f6cc063a1 (patch)
tree50e7c738ab37bf93cb40ab995c8aabaac834b8ef /virt
parent7ac07a26dea79c3892436bce41cce03dcbd3c4c7 (diff)
downloadlwn-001d9273570115b2eb360d5452bbc46f6cc063a1.tar.gz
lwn-001d9273570115b2eb360d5452bbc46f6cc063a1.zip
zram: add recompression algorithm sysfs knob
Introduce recomp_algorithm sysfs knob that controls secondary algorithm selection used for recompression. We will support up to 3 secondary compression algorithms which are sorted in order of their priority. To select an algorithm user has to provide its name and priority: echo "algo=zstd priority=1" > /sys/block/zramX/recomp_algorithm echo "algo=deflate priority=2" > /sys/block/zramX/recomp_algorithm During recompression zram iterates through the list of registered secondary algorithms in order of their priorities. We also have a short version for cases when there is only one secondary compression algorithm: echo "algo=zstd" > /sys/block/zramX/recomp_algorithm This will register zstd as the secondary algorithm with priority 1. Link: https://lkml.kernel.org/r/20221109115047.2921851-3-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Alexey Romanov <avromanov@sberdevices.ru> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Suleiman Souhlal <suleiman@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions