lkml.org 
[lkml]   [2024]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2 00/17] zram: convert to custom comp API and allow algorithms configuration
On (24/05/06 16:58), Sergey Senozhatsky wrote:
> This patch set moves zram from crypto API to a custom compression
> API which allows us to tune and configure compression algorithms,
> something that crypto API, unfortunately, doesn't support. Basically,
> this seroes brings back the bits of comp "backend" code that we had
> many years ago. This means that if we want zram to support new
> compression algorithms we need to implement corresponding backends.
>
> Currently, zram supports a pretty decent number of comp backends:
> lzo, lzorle, lz4, lz4hc, 842, deflate, zstd
>
> At this point we handle 2 parameters: a compression level and
> a pre-trained compression dictionary. Which seems like a good enough
> start. The list will be extended in the future.
>
> Examples:
>
> - changes default compression level
> echo "algo=zstd level=11" > /sys/block/zram0/comp_algorithm
>
> - passes path to a pre-trained dictionary
> echo "algo=zstd dict=/etc/dictionary" > /sys/block/zram0/comp_algorithm

I'll send v3 shortly, which adds pre-trained dictionary support to
lz4 and lz4hc compression backends. Apparently lz4/lz4hc can use
dictionaries pre-trained with zstd --init, just like zstd.

\
 
 \ /
  Last update: 2024-05-08 09:42    [W:0.094 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site