From: Gao Xiang <xiang@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-erofs@lists.ozlabs.org, LKML <linux-kernel@vger.kernel.org>,
Gao Xiang <xiang@kernel.org>, SJ Park <sj@kernel.org>,
Guenter Roeck <groeck7@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] erofs: fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms
Date: Wed, 12 Aug 2026 21:11:43 +0800 [thread overview]
Message-ID: <20260812131144.30802-1-xiang@kernel.org> (raw)
In-Reply-To: <CAMuHMdUO8_BY514PhSXeEPABCoeaJcEk1TimzxvtwPz6zFA5nw@mail.gmail.com>
CONFIG_NR_CPUS doesn't define on some UP platforms (e.g. arm), so this
can cause make oldconfig to loop indefinitely when CONFIG_SMP=n:
$ make ARCH=arm allmodconfig
$ sed -i "/CONFIG_SMP=y/d" .config
$ sed -i "/CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS.*/d" .config
EROFS LZMA default maximum decompression streams (EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS) [0] (NEW)
EROFS LZMA default maximum decompression streams (EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS) [0] (NEW)
...
Let's guard NR_CPUS with SMP instead of using a hardcoded arbitrary CPU
uplimit here, similar to commit a3344078101c ("mm: make SPLIT_PTE_PTLOCKS
depend on SMP").
The initial report from SJ Park was for m68k [1] (m68k is the only arch
without NR_CPUS in Kconfig), and it will be changed in another patch [2].
[1] https://lore.kernel.org/all/anuyFHLUGDjZWY4K@XiangdeMacBook-Pro.local/T/#u
[2] https://lore.kernel.org/r/20260731094950.1988084-2-ukleinek@kernel.org
Reported-by: SJ Park <sj@kernel.org>
Closes: https://lore.kernel.org/r/20260728065447.91511-1-sj@kernel.org
Reported-by: Guenter Roeck <groeck7@gmail.com>
Closes: https://lore.kernel.org/r/87853c96-cc8f-49e6-81b1-02bfe409e372@roeck-us.net
Fixes: c9b47e6b2311 ("erofs: cap LZMA stream pool size")
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Gao Xiang <xiang@kernel.org>
---
Hi Linus,
Could you apply this Kconfig fix directly since I don't have other urgent
patch for 7.2 (so maybe it's unnecessary to have a pull request just for
this..)
Many thank,
Gao Xiang
fs/erofs/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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.
--
2.47.3
next prev parent reply other threads:[~2026-08-12 13:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 11:47 [PATCH v3] erofs: cap LZMA stream pool size Michael Bommarito
2026-07-17 3:43 ` Gao Xiang
2026-07-21 3:44 ` Gao Xiang
2026-07-28 3:46 ` SJ Park
2026-07-28 6:31 ` Gao Xiang
2026-07-28 6:54 ` SJ Park
2026-08-03 8:09 ` Geert Uytterhoeven
2026-08-03 9:12 ` Uwe Kleine-König
2026-08-11 19:27 ` Geert Uytterhoeven
2026-08-11 19:35 ` Guenter Roeck
2026-08-11 19:37 ` Michael Bommarito
2026-08-11 23:36 ` Gao Xiang
2026-08-12 9:30 ` Geert Uytterhoeven
2026-08-12 10:54 ` Gao Xiang
2026-08-12 11:28 ` Geert Uytterhoeven
2026-08-12 13:11 ` Gao Xiang [this message]
2026-08-12 13:34 ` [PATCH] erofs: fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms Geert Uytterhoeven
2026-08-12 14:13 ` Gao Xiang
2026-08-12 14:21 ` SJ Park
2026-08-12 14:25 ` [PATCH v3] erofs: cap LZMA stream pool size Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812131144.30802-1-xiang@kernel.org \
--to=xiang@kernel.org \
--cc=geert@linux-m68k.org \
--cc=groeck7@gmail.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.