From 892398140b1d8b6dbda9144c35722e1f02a93525 Mon Sep 17 00:00:00 2001 From: Tashfin Shakeer Rhythm Date: Thu, 29 Sep 2022 20:50:37 +0600 Subject: [PATCH] include/linux: lz4: Reduce LZ4 memory usage to 1KB As per Sony, 1KB of memory size for LZ4 is enough as we only use LZ4 for zRAM and so our blocks are 4KB in size. Therefore, reduce the LZ4 memory usage to 1KB. This can enhance the speed of LZ4. Signed-off-by: Tashfin Shakeer Rhythm Signed-off-by: Alexander Winkowski --- include/linux/lz4.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/lz4.h b/include/linux/lz4.h index 97ae77c47..5b76f4a1c 100755 --- a/include/linux/lz4.h +++ b/include/linux/lz4.h @@ -55,7 +55,8 @@ * Reduced memory usage can improve speed, due to cache effect * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ -#define LZ4_MEMORY_USAGE 14 +/* We only use LZ4 for zRAM, so the blocks are 4KB in size. 1KB is enough here */ +#define LZ4_MEMORY_USAGE 10 #define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */ #define LZ4_COMPRESSBOUND(isize) (\