Re: [PATCH v2 3/3] erofs: introduce readmore decompression strategy

From: Chao Yu
Date: Tue Oct 19 2021 - 08:58:57 EST


On 2021/10/17 23:42, Gao Xiang wrote:
On Sun, Oct 17, 2021 at 11:34:22PM +0800, Chao Yu wrote:
On 2021/10/9 4:08, Gao Xiang wrote:
From: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>

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.

Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>

Looks fine to me now.

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,