Commit 2a23d59f authored by Chunhai Guo's avatar Chunhai Guo Committed by Matthias Männich
Browse files

BACKPORT: erofs: rename per-CPU buffers to global buffer pool and make it configurable



It will cost more time if compressed buffers are allocated on demand for
low-latency algorithms (like lz4) so EROFS uses per-CPU buffers to keep
compressed data if in-place decompression is unfulfilled.  While it is kind
of wasteful of memory for a device with hundreds of CPUs, and only a small
number of CPUs concurrently decompress most of the time.

This patch renames it as 'global buffer pool' and makes it configurable.
This allows two or more CPUs to share a common buffer to reduce memory
occupation.

Suggested-by: default avatarGao Xiang <xiang@kernel.org>
Reviewed-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: default avatarChunhai Guo <guochunhai@vivo.com>
Link: https://lore.kernel.org/r/20240402100036.2673604-1-guochunhai@vivo.com


Signed-off-by: default avatarSandeep Dhavale <dhavale@google.com>
Link: https://lore.kernel.org/r/20240408215231.3376659-1-dhavale@google.com


Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>

Bug: 348591003
Change-Id: I319248d41ce346e840bd292a80b0a0a6bb2a7359
(cherry picked from commit f36f3010)
[Chunhai: Resolved minor conflict in fs/erofs/Makefile,
fs/erofs/internal.h, fs/erofs/super.c, and fs/erofs/zutil.c ]
Signed-off-by: default avatarChunhai Guo <guochunhai@vivo.com>
parent bb687ee6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment