From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95290190462 for ; Mon, 17 Aug 2026 08:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786954201; cv=none; b=J78LAXDChJ0XF5jSJdrwYDPOuE4NkAguqBmM6Ucgv/hZIO5MQqpBgUIhjPs1ij5wzYGH7SZOizjMLpoyJHpeOkPS/3iwsUA3z7PgyBnNuTOQ0pm369cID3OSasNbQthhEistzQikoGaIS81eZaqF5jab2XIfLnS9s/Rd5RA3yao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786954201; c=relaxed/simple; bh=YIhg/EgQqBUsAlkcZPYcxAg5EtYIzq4Wn0vCxDGQCyo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GRQMpGSv9FBez7UP/TC4iYezbz79QJK2Rcn9w0kLFNDBM1BhlzUpGwNkGxY1pQBzd3JjZR4BQzk3s3IENeFDMhOIhUJFd09Bszft4p02AYha48RavorHtLyRMCb409S2GwciKFIXfu4tBYUzmT45wGlaG9vZX99itbR2d11oNuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RDZ/9xpJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RDZ/9xpJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 361611F000E9; Mon, 17 Aug 2026 08:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786954200; bh=PLA3WJ9fmd7lCZh4vW3Goc7AroiX//cyy+tOp+iiQRQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=RDZ/9xpJ6PAG5T2NCClL54ukpiS7d1AWEF5IYgFbT85BcjV6+kAVBJB0nwx5yEDUp eEErymmQR1Hb8NugVbMjC0Vop5CKP/AMGg1cz4NfdvY0fI28InR4zg1q/58saLF8hK aeWjta1A38HheyTJDE9O0u9oCPMqvtGIzmljt9blYBhOJcT8xA5VqjgUY222GDZtQD tsXD8DRCuWFA/AeTu++fih8n/klHp4FN5Vjdp8jGczWumY6gVN7FvWzA25f2w0ctyS QXDrAIEvxkq5Jb64SNhZM20zEfJz1JuzL6em727WZC8VHaE6Z66uFKcNdaQF6S1ZnZ ugPn+nPeRpPXw== Date: Mon, 17 Aug 2026 16:09:54 +0800 From: Gao Xiang To: Geert Uytterhoeven Cc: Gao Xiang , Linus Torvalds , linux-erofs@lists.ozlabs.org, LKML , SJ Park , Guenter Roeck Subject: Re: [PATCH] erofs: fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms Message-ID: Mail-Followup-To: Geert Uytterhoeven , Gao Xiang , Linus Torvalds , linux-erofs@lists.ozlabs.org, LKML , SJ Park , Guenter Roeck References: <20260812131144.30802-1-xiang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Mon, Aug 17, 2026 at 10:05:09AM +0200, Geert Uytterhoeven wrote: > Hi Gao, > > On Mon, 17 Aug 2026 at 09:49, Gao Xiang wrote: > > On Mon, Aug 17, 2026 at 09:32:51AM +0200, Geert Uytterhoeven wrote: > > > Thanks for your patch, which is now commit a64d500b0078e16e ("erofs: fix > > > EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS on some UP platforms") in v7.2. > > > > > > > --- 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 > > > > > > I have just discovered another oddity: when you have less than 16 > > > CPUS (including SMP=n), this default value is invalid, and "make > > > savedefconfig" will always write a line like > > > > > > CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=1 > > > > > > to the defconfig file, even if that is the default suggested value. > > > > > > Needlessly polluting the defconfig files could be fixed using: > > > > > > - default 16 > > > + default 16 if SMP && NR_CPUS >= 16 > > > + default NR_CPUS if SMP > > > > I guess `default NR_CPUS if SMP && NR_CPUS < 16` would be better, > > I'm not sure since I'm not handy in Kconfig stuffs. > > Kconfig always picks the first matching default value, so you don't > have to exclude the "SMP && NR_CPUS >= 16" case here. > > > > + default 1 if !SMP > > If all architectures would always define NR_CPUS, one could replace > the last two lines by > > default NR_CPUS > > > > > > > Thoughts? > > > > In principle, that would be better, but may I ask if there is some > > severe consequences out of one extra line of > > CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=1? > > > > Since it has been fixed for many times, I hope if it could be improved > > later if no severe impacts, sigh.. > > It causes more churn (defconfig updates), and makes the defconfig > files larger than needed. Could you submit a formal patch directly (since you found it and suggested a version)? so I could submit it along with the pull request if you're fine with it. Thanks, Gao Xiang > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds >