]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: introduce readmore decompression strategy
authorGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 8 Oct 2021 20:08:39 +0000 (04:08 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 19 Oct 2021 15:44:30 +0000 (23:44 +0800)
commitc156fc2fb5dd729b9e49ac651ce66640e0c85e5f
tree091b5ad7c47dd5350335d45dd7dc3f529a21d6ab
parent57726d6145bfaefe30ab60480d9727f6a14395df
erofs: introduce readmore decompression strategy

Previously, the readahead window was strictly followed by EROFS
decompression strategy in order to minimize extra memory footprint.
However, it could become inefficient if just reading the partial
requested data for much big LZ4 pclusters and the upcoming LZMA
implementation.

Let's try to request the leading data in a pcluster without
triggering memory reclaiming instead for the LZ4 approach first
to boost up 100% randread of large big pclusters, and it has no real
impact on low memory scenarios.

It also introduces a way to expand read lengths in order to decompress
the whole pcluster, which is useful for LZMA since the algorithm
itself is relatively slow and causes CPU bound, but LZ4 is not.

Link: https://lore.kernel.org/r/20211008200839.24541-4-xiang@kernel.org
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/internal.h
fs/erofs/zdata.c