From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70787276050 for ; Mon, 3 Aug 2026 09:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785748380; cv=none; b=Q4LxdAFLjRcNNTYAWMiKaYm7Of0udmQEy0HpO1wGqFt+aKv7SVE99uMbFo2N5I87ZWzCNJrQtEVU9w8BtNqVHy6Av2q0s+tb6lS7OFBfzHmiO5ZHceCH5aJDoSlFAKkRYUQT8/QvejX5O7V6yQmd42KU0LExXDDlES4+h8Xaafs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785748380; c=relaxed/simple; bh=4VnrRSHs4to30lmE9cZ/EII1zUl/BQKZJQejhw69rWE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GzjXNReMURBJLLUcxK5qTg3UOL2w3YFi+HAuaSPDSODj0rh0nwMh3gcOFhbppoWp5rZXed3NPJVdLNhX1MSD0uj0Z9GhAo/tsj1gyXAt4tQo+c32Y/IgxHzRnHhZpwYtCeXZphg66vQRM56fwXkLt/i7hx9yurj3H4hBqC7B8Fc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=f1sZ+Ml/; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="f1sZ+Ml/" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-47f7027ca11so1935459f8f.3 for ; Mon, 03 Aug 2026 02:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1785748372; x=1786353172; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Tf9PxesmSKIPqmzevqF82I/y3pP5pgGQ+7FsJ/KVC3M=; b=f1sZ+Ml/E7PECemhBBjD6i4wreS8e20QSNQVXNiAvgqcPCsMWNO2+hSGmeg9QcVLwU HXUWpamxxLQzj8iFHKZRPPel5Mggz6Z4IG0ETt4EYPL2lEG1JHOAsmUJE56Aw/GC0b7J T86Oo8fsB0yg4Itft+SCIn/VinaZTml3jUheWew61QRArHzmXiAHlYPRNDi00aP4R0QV Iqma/ObOHi5dA7NDTWMrDjOVfDCOhFqLFRJ//amRjhGri8lkapm4dMsgfbKmNDC88GO9 JAHfRApm5eSbjwDSXO2CS3XDs8WrLjlnVDCTRx72zqRkWhQjisDrBXxVAlWuZNT/5ldr F1FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785748372; x=1786353172; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Tf9PxesmSKIPqmzevqF82I/y3pP5pgGQ+7FsJ/KVC3M=; b=iX3Wo+9OcVkTgU3mtEjxp2Hl9gdR2qT5ncgjlPKxd1WPAbZcmOs/GRIUlFPdqvOLtU UZ5vhDdE55jt+UaU3WSf4li0Ki+kLIJiiX3fqUruuqF4YcWFEbKmLGX/Js3E350v47rH eV8QKG1qlXvsHUoXODDEqOwspsLa/8MgQIDh0xZjTBMHKxQB4TQHgBbRSoglBgQA75wN NpKndHufuszqypFpi5vYexAkFoBqhku7EDne9bYO4T3W4TwOMVS07JNzB3LxZFyRZTtr TJf81lnUjyXIcNd39TJmeW7HoCJ9HrrPkLuYs7XyrFoDR2Bn6qpoFRQsK36bOkmu9EKL s2BA== X-Forwarded-Encrypted: i=1; AHgh+Rq+mhh7TM1lmt8bAhzAPwVuouNsAPP+pqAN60jG5541DetSHV9jSP1NJoo4oJecZCcR/Qzfjmp4s92RWwA=@vger.kernel.org X-Gm-Message-State: AOJu0Yyl5ei9eBMetsQ2N1b1jpmkAx2E6ZupnZK/lDNSYuqjeH6K3PSN B9KJtGGCUgHtCgSgHbHufypvtV5DshbeWoi7VItvHay+qVf5pB8SloROukfrsCsTVMY= X-Gm-Gg: AR+sD13q5aSHoahfjkXOGT5XFMsl4FcnQvosS01i3W3+lfl+cBB+ohH9jVebDzY25OS 4Vsrrj5eHa1karW8/85CN2AxvGwxQeTs/vV+6J74v1cCq/lGqvb+fjGEjzXBKf1v+B89B39cxoV zEvqUnxjHdGKHpffafM7n7y4MgUJ2P8FOu/N85OlmvM5L9WxL8fkwLvhn65XJKURGZfU8/ipurG Zc7jP6EKgjuTEhHwkoXSBg8kvVdvY1z28+3MektYhHP1cbyqUcGo+mR1cRwQ5zibxDMg3pgUg2V 6K1PYUl7+1++X6REXOOlVDSk7wlTB9+KETddX5+aE4Y8uy42p5k1mgHGguYkN4YfPa9OxpqJhy9 FXHQsfyS5KtOhQ5kg9LBNqF0SIUtFc17iITCvYiuoFTFwG/IC5y+k9GaCLQz/ZHDNHM1BNiNNiM cUdqhJfx1RZYsLYCbi92NNldzk/w4THUfYHsFooF3TermjxbuykF539Tfp5IkEn1gKRvE7rf6Bj 0bDaTHjEdExDWZb X-Received: by 2002:a05:6000:2203:b0:47f:cb39:10c4 with SMTP id ffacd0b85a97d-47fd72c75d5mr20472888f8f.12.1785748372101; Mon, 03 Aug 2026 02:12:52 -0700 (PDT) Received: from localhost (p5dc68b01.dip0.t-ipconnect.de. [93.198.139.1]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-47fe742936csm85878f8f.31.2026.08.03.02.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:12:51 -0700 (PDT) Date: Mon, 3 Aug 2026 11:12:49 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Geert Uytterhoeven Cc: SJ Park , Gao Xiang , Gao Xiang , Michael Bommarito , Yue Hu , Jeffle Xu , Sandeep Dhavale , Chunhai Guo , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, Chao Yu , Guenter Roeck , David Hildenbrand Subject: Re: [PATCH v3] erofs: cap LZMA stream pool size Message-ID: References: <20260728065447.91511-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sfor6dhu35gfvxc4" Content-Disposition: inline In-Reply-To: --sfor6dhu35gfvxc4 Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v3] erofs: cap LZMA stream pool size MIME-Version: 1.0 Hello, On Mon, Aug 03, 2026 at 10:09:06AM +0200, Geert Uytterhoeven wrote: > On Tue, 28 Jul 2026 at 08:55, SJ Park wrote: > > I don't have a m68k testfarm, either. I'm doing crossbuild [1]. Hopef= ully you > > could also reproduce it. FTR, I don't have m68k hardware either, but as this is a build time failure installing the Debian package gcc-m68k-linux-gnu and then doing builds using make ARCH=3Dm68k CROSS_COMPILE=3Dm68k-linux-gnu- is good enough to reproduce the failure. > I think you can reproduce some of the issues on most architectures > with a non-SMP kernel, cfr. my reply[1] to Uwe's proposed fix. > Unfortunately the Kconfig warning only shows up on architectures that > don't define NR_CPUS (because they do not support SMP) at all, > while ending up with zero streams is probably a runtime failure. >=20 > [1] https://lore.kernel.org/CAMuHMdVGKX=3D3cfOrLWp1uSHX76xf1-=3DC0+GVCXkA= 8JTqNPg-ew@mail.gmail.com I guess EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS should depend on SMP and it's use should be conditionalized using something like diff --git a/fs/erofs/decompressor_lzma.c b/fs/erofs/decompressor_lzma.c index 6b0cdb446c6a..c00e94f8206f 100644 --- a/fs/erofs/decompressor_lzma.c +++ b/fs/erofs/decompressor_lzma.c @@ -50,9 +50,13 @@ static int __init z_erofs_lzma_init(void) unsigned int i; =20 /* by default, use # of possible CPUs instead */ - if (!z_erofs_lzma_nstrms) - z_erofs_lzma_nstrms =3D min_t(unsigned int, num_possible_cpus(), - CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS); + if (!z_erofs_lzma_nstrms) { + if (IS_ENABLED(CONFIG_SMP)) + z_erofs_lzma_nstrms =3D min_t(unsigned int, num_possible_cpus(), + CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS); + else + z_erofs_lzma_nstrms =3D 1; + } =20 for (i =3D 0; i < z_erofs_lzma_nstrms; ++i) { struct z_erofs_lzma *strm =3D kzalloc_obj(*strm); I played a bit with the definition of EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS in fs/erofs/Kconfig, but didn't find a way to define it that both uses NR_CPUS and doesn't generate a warning with ARCH=3Dm68k. Best regards Uwe --sfor6dhu35gfvxc4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmpwW40ACgkQj4D7WH0S /k5LwAf/cdL6nHd/eq299wreF7wmJ/uzYymvnXI6g+WJKc5gZTwGHYeRdcLbnNux 3HBeU54Tekgm2/c8Dzf1HKMr8yW83g9d+dnWpEhjjrBtU1neZDCs8SkUV5cZmtAZ eBU0DQ6xEvWD5+uUuCkoluWU/0jQXAzzdhpGcGBTCFRIORwXEwDpRK/190nXO64u TNhzAxYRmmWop9WnxcL6ZsVv/d/bcRHM+th39zYaV3bfh6XDNsjhYriUqkcJVezF +XTq18Wb4HY77xH61A0s/5cd75E3/zLtHfoqb6oGX7PpiEsliZxqUKdIPPpytxBf xOsHM7j3e1USwS8UybcC6AKsa7K+bw== =9m7x -----END PGP SIGNATURE----- --sfor6dhu35gfvxc4--