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 <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
Tashfin Shakeer Rhythm 2022-09-29 20:50:37 +06:00 committed by Ksawlii
parent 681fcbd50c
commit 892398140b

View file

@ -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) (\