linux/include
Sergey Senozhatsky 4fc4187984 lib: zstd: export API needed for dictionary support
Patch series "zram: introduce custom comp backends API", v7.

This series introduces support for run-time compression algorithms tuning,
so users, for instance, can adjust compression/acceleration levels and
provide pre-trained compression/decompression dictionaries which certain
algorithms support.

At this point we stop supporting (old/deprecated) comp API.  We may add
new acomp API support in the future, but before that zram needs to undergo
some major rework (we are not ready for async compression).

Some benchmarks for reference (look at column #2)

*** init zstd
/sys/block/zram0/mm_stat
1750659072 504622188 514355200        0 514355200        1        0    34204    34204

*** init zstd dict=/home/ss/zstd-dict-amd64
/sys/block/zram0/mm_stat
1750650880 465908890 475398144        0 475398144        1        0    34185    34185

*** init zstd level=8 dict=/home/ss/zstd-dict-amd64
/sys/block/zram0/mm_stat
1750654976 430803319 439873536        0 439873536        1        0    34185    34185

*** init lz4
/sys/block/zram0/mm_stat
1750646784 664266564 677060608        0 677060608        1        0    34288    34288

*** init lz4 dict=/home/ss/lz4-dict-amd64
/sys/block/zram0/mm_stat
1750650880 619990300 632102912        0 632102912        1        0    34278    34278

*** init lz4hc
/sys/block/zram0/mm_stat
1750630400 609023822 621232128        0 621232128        1        0    34288    34288

*** init lz4hc dict=/home/ss/lz4-dict-amd64
/sys/block/zram0/mm_stat
1750659072 505133172 515231744        0 515231744        1        0    34278    34278


Recompress
init zram zstd (prio=0), zstd level=5 (prio 1), zstd with dict (prio 2)

*** zstd
/sys/block/zram0/mm_stat
1750982656 504630584 514269184        0 514269184        1        0    34204    34204

*** idle recompress priority=1 (zstd level=5)
/sys/block/zram0/mm_stat
1750982656 488645601 525438976        0 514269184        1        0    34204    34204

*** idle recompress priority=2 (zstd dict)
/sys/block/zram0/mm_stat
1750982656 460869640 517914624        0 514269184        1        0    34185    34204


This patch (of 24):

We need to export a number of API functions that enable advanced zstd
usage - C/D dictionaries, dictionaries sharing between contexts, etc.

Link: https://lkml.kernel.org/r/20240902105656.1383858-1-senozhatsky@chromium.org
Link: https://lkml.kernel.org/r/20240902105656.1383858-2-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-09 16:39:06 -07:00
..
acpi ACPI: video: Add Dell UART backlight controller detection 2024-08-19 15:58:35 +02:00
asm-generic arch_numa: switch over to numa_memblks 2024-09-03 21:15:32 -07:00
clocksource
crypto
drm A revert for a previous TTM commit causing stuttering, 3 fixes for 2024-08-30 11:28:11 +10:00
dt-bindings I3C for 6.11 2024-07-27 10:53:06 -07:00
keys
kunit
kvm
linux lib: zstd: export API needed for dictionary support 2024-09-09 16:39:06 -07:00
math-emu
media
memory
misc
net netfilter pull request 24-08-28 2024-08-29 11:35:54 +02:00
pcmcia
ras
rdma
rv
scsi scsi: core: Fix the return value of scsi_logical_block_count() 2024-08-16 21:02:06 -04:00
soc net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged 2024-08-16 09:59:32 +01:00
sound ASoC: Fixes for v6.11 2024-08-09 09:58:07 +02:00
target
trace x86: remove PG_uncached 2024-09-03 21:15:46 -07:00
uapi mm: remove PG_error 2024-09-01 20:26:05 -07:00
ufs scsi: ufs: core: Add a quirk for handling broken LSDBS field in controller capabilities register 2024-08-16 21:09:17 -04:00
vdso Random number generator updates for Linux 6.11-rc1. 2024-07-24 10:29:50 -07:00
video
xen Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00