From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 07 Mar 2024 17:04:18 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1riGEE-00CRdO-2r for lore@lore.pengutronix.de; Thu, 07 Mar 2024 17:04:18 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1riGEE-0003Nl-6U; Thu, 07 Mar 2024 17:04:18 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1riGE5-0003Na-4U; Thu, 07 Mar 2024 17:04:09 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1riGE4-004yXU-M2; Thu, 07 Mar 2024 17:04:08 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1riGE4-00Cw2s-1t; Thu, 07 Mar 2024 17:04:08 +0100 Date: Thu, 7 Mar 2024 17:04:08 +0100 From: Michael Olbrich To: Christian Melki Message-ID: Mail-Followup-To: Christian Melki , ptxdist@pengutronix.de References: <20240225144906.2406989-1-christian.melki@t2data.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240225144906.2406989-1-christian.melki@t2data.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH] image-root-cpio.in: Use multithreaded XZ (revisited). X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi, On Sun, Feb 25, 2024 at 03:49:06PM +0100, Christian Melki wrote: > So, after asking questions about the default multithread mode > of xz 5.6.0 and determinism, it turned out that there > is a common misconception about determinism in xz. > > XZ compression varies between the two compressors. Ie, the single > thread and multi thread variant. T0 always uses the multithread > one, even if used on one core. But T1 uses the singlethread > compressor. > > This has caused a very common misconception about determinism > variability with number of threads. I've seen this discussion > on a lot of places. So albeit true, it only applies to the > distinct compressors, not how many threads are used in > multithread mode. > > Now after giving this some thought I've decided to reenable > threaded XZ, using T0. T0 should produce the same results always, > on any target. Even unicore machines. And with the multithread > compressor now being the default, users should end up with the > same results unless they are actively using T1. So if I understand it correctly then multithreaded compression results i a slightly larger output file. But it also means that it can be extracted with multiple threads. The question is: will that actually happen? The initramfs is extracted by the kernel and I'm not sure if it supports that. Michael > Signed-off-by: Christian Melki > --- > platforms/image-root-cpio.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/platforms/image-root-cpio.in b/platforms/image-root-cpio.in > index 0338175a0..546dda7fb 100644 > --- a/platforms/image-root-cpio.in > +++ b/platforms/image-root-cpio.in > @@ -84,7 +84,7 @@ config IMAGE_ROOT_CPIO_COMPRESSION_UTIL > default "" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_NONE > default "gzip" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_GZ > default "zstd -T0 -19" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_ZSTD > - default "xz --check=crc32" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_XZ > + default "xz -T0 --check=crc32" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_XZ > default "lzop" if IMAGE_ROOT_CPIO_COMPRESSION_MODE_LZOP > > endif > -- > 2.34.1 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |