Re: [PATCH v3] erofs: cap LZMA stream pool size
From: Guenter Roeck
Date: Fri Aug 14 2026 - 14:44:42 EST
On 8/14/26 11:26, Gao Xiang wrote:
Hi Guenter,$ grep NR_CPUS .config
On Wed, Aug 12, 2026 at 07:25:50AM -0700, Guenter Roeck wrote:
...
Thank you, that seems to work (despite still seeing the warning on m68k,
as NR_CPUS does not exist).
...
$ make ARCH=m68k allmodconfig
fs/erofs/Kconfig:137:warning: range is invalid
Warning...
Yes, other arches shouldn't have the warning because I think other
arches (including microblaze) defines NR_CPUS in Kconfig, except m68k.
That is not entirely true. openrisc only has it if SMP=y. But it still
does not generate the warning for some reason.
I looked into the documentation a bit
(https://docs.kernel.org/kbuild/kconfig-language.html), especially the
following parts:
- type definition: “bool”/”tristate”/”string”/”hex”/”int” ...
- input prompt: “prompt” <prompt> [“if” <expr>] ...
and "If a prompt is not present, the config option is
a non-visible symbol, ..."
- dependencies: “depends on” <expr> [“if” <expr>] ...
- Menu dependencies ..
and I think that is true, taking openrisc for example:
config NR_CPUS
int "Maximum number of CPUs (2-32)"
range 2 32
depends on SMP
default "2"
which can be transformed into
config NR_CPUS
int
prompt "Maximum number of CPUs (2-32)"
range 2 32
depends on SMP
default "2"
which can be then transformed into
config NR_CPUS
int
prompt "Maximum number of CPUs (2-32)" if SMP
range 2 32 if SMP
default "2" if SMP
so if `SMP=n`, it's equivalent to
config NR_CPUS
int
so NR_CPUS symbol is still there I think (and its value is 0.)
CONFIG_FORCE_NR_CPUS=y
$ grep EROFS .config
CONFIG_EROFS_FS=y
# CONFIG_EROFS_FS_DEBUG is not set
CONFIG_EROFS_FS_XATTR=y
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
CONFIG_EROFS_FS_BACKED_BY_FILE=y
CONFIG_EROFS_FS_ZIP=y
CONFIG_EROFS_FS_ZIP_LZMA=y
CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=0
# CONFIG_EROFS_FS_ZIP_DEFLATE is not set
# CONFIG_EROFS_FS_ZIP_ZSTD is not set
# CONFIG_EROFS_FS_ZIP_ACCEL is not set
# CONFIG_EROFS_FS_PCPU_KTHREAD is not set
# CONFIG_EROFS_FS_PAGE_CACHE_SHARE is not set
The symbol may be there internally, but it does not show up in .config.
Guenter