Re: [PATCH] erofs: Fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS default logic
From: Gao Xiang
Date: Thu Aug 20 2026 - 09:13:06 EST
On Thu, Aug 20, 2026 at 05:51:08AM -0700, Guenter Roeck wrote:
> On Thu, Aug 20, 2026 at 12:00:23PM +0200, Geert Uytterhoeven wrote:
> > When NR_CPUS is less than 16, or when SMP is disabled, the default value
> > of 16 is invalid.
> >
> > While actual configuration picks up a sensible and valid default
> > (NR_CPUS or 1), "make savedefconfig" will still write a line like
> >
> > CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=1
> >
> > to the defconfig file, even if that matches the sensible default.
> >
> > Avoid needlessly enlarging the defconfig files, and reduce churn for
> > updating them, by specifying valid defaults depending on SMP and
> > NR_CPUS.
> >
> > While at it, make the prompt depend on SMP, as there is no point in
> > asking the user about the maximum number of decompression streams if
> > there is only one valid answer.
> >
>
> Absolutely agree.
As I replied to Geert, unless there is a mandatory requirement
documented that "there is no point to make a Kconfig visible if there
is only one valid number".
I tend to avoid making EROFS Kconfig visibility depend on arbitrary
architecture Kconfig options such as SMP or !SMP; SMP here is due to
some arches make NR_CPUS = 0 if !SMP, but it doesn't need to bother
users why a EROFS kconfig visibility has some relationship with an arch
kconfig.
Thanks,
Gao Xiang