linux/fs/erofs
Huang Jianan 5d50538fc5 erofs: support adjust lz4 history window size
lz4 uses LZ4_DISTANCE_MAX to record history preservation. When
using rolling decompression, a block with a higher compression
ratio will cause a larger memory allocation (up to 64k). It may
cause a large resource burden in extreme cases on devices with
small memory and a large number of concurrent IOs. So appropriately
reducing this value can improve performance.

Decreasing this value will reduce the compression ratio (except
when input_size <LZ4_DISTANCE_MAX). But considering that erofs
currently only supports 4k output, reducing this value will not
significantly reduce the compression benefits.

The maximum value of LZ4_DISTANCE_MAX defined by lz4 is 64k, and
we can only reduce this value. For the old kernel, it just can't
reduce the memory allocation during rolling decompression without
affecting the decompression result.

Link: https://lore.kernel.org/r/20210329012308.28743-3-hsiangkao@aol.com
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Guo Weichao <guoweichao@oppo.com>
[ Gao Xiang: introduce struct erofs_sb_lz4_info for configurations. ]
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
2021-03-29 10:24:58 +08:00
..
compress.h erofs: force inplace I/O under low memory scenario 2020-12-09 20:42:02 +08:00
data.c erofs: don't use erofs_map_blocks() any more 2021-03-29 10:19:53 +08:00
decompressor.c erofs: support adjust lz4 history window size 2021-03-29 10:24:58 +08:00
dir.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
erofs_fs.h erofs: support adjust lz4 history window size 2021-03-29 10:24:58 +08:00
inode.c erofs: add unsupported inode i_format check 2021-03-29 10:20:45 +08:00
internal.h erofs: support adjust lz4 history window size 2021-03-29 10:24:58 +08:00
Kconfig erofs: support superblock checksum 2019-11-24 11:02:41 +08:00
Makefile erofs: remove a void EROFS_VERSION macro set in Makefile 2020-12-08 18:06:06 +08:00
namei.c erofs: use %pd instead of messing with ->d_name 2021-01-06 19:39:37 -05:00
super.c erofs: support adjust lz4 history window size 2021-03-29 10:24:58 +08:00
tagptr.h erofs: move erofs out of staging 2019-08-24 14:20:10 +02:00
utils.c erofs: fold in used-once helper erofs_workgroup_unfreeze_final() 2020-08-03 21:04:46 +08:00
xattr.c erofs: initialized fields can only be observed after bit is set 2021-02-11 11:55:28 +08:00
xattr.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
zdata.c erofs: complete a missing case for inplace I/O 2021-03-29 10:18:01 +08:00
zdata.h erofs: get rid of magical Z_EROFS_MAPPING_STAGING 2020-12-08 18:08:21 +08:00
zmap.c erofs: initialized fields can only be observed after bit is set 2021-02-11 11:55:28 +08:00
zpvec.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00