Re: [PATCH v3] erofs: cap LZMA stream pool size
From: Gao Xiang
Date: Tue Aug 11 2026 - 19:37:09 EST
Hi,
On Tue, Aug 11, 2026 at 03:37:38PM -0400, Michael Bommarito wrote:
> On Tue, Aug 11, 2026 at 3:35 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> > > Any progress with fixing this for v7.2?
>
> I would like to fix this since I started the problem with the original
> patch, but I feel a bit stuck. My v1 and v2 patches would not have
> triggered the build failure, but Gao made valid points about the
> trade-offs that led us to this v3. Maybe it would be worth your
> opinion on the config approach in those earlier patches?
>
Sorry about the late reply.
As I said, I really dislike hardcoded range, but it is an issue that no
NR_CPUS definition on CONFIG_SMP:
I wonder if the following diff resolves the m68k issue (I'm not an
Kconfig expert but it seems to work on x86_64 !CONFIG_SMP):
diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
index 8ca1767dafb6..2dfc313588d2 100644
--- a/fs/erofs/Kconfig
+++ b/fs/erofs/Kconfig
@@ -134,7 +134,8 @@ config EROFS_FS_ZIP_LZMA
config EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS
int "EROFS LZMA default maximum decompression streams"
depends on EROFS_FS_ZIP_LZMA
- range 1 NR_CPUS
+ range 1 NR_CPUS if SMP
+ range 1 1 if !SMP
default 16
help
By default EROFS allocates one LZMA decompression stream per CPU.
Thanks,
Gao Xiang