From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 334CF5A0278 for ; Sat, 6 Apr 2024 05:11:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1712373076; bh=KIHslzagmJlofdA24cGp6jh7IOA8+aq9Dt/vTaJ3ex4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ILzTy3CY3XSm9RTd4oudHBtWLJ2PB6hsA3v8ecrf18EyVNji4OYvS92Z8vD3Xx4zW GzuHHYXgYwTKWlTFIP+hbIZwwWhuHgJqr9olvmMC7TizyBbH6xtMtBkFbSZgrt6gxE B8nZpHsIo0LZll7UVmSfViI8SRYvt0SIzj0AND0p6ix5PBXyIJNgY1SF5fqGT9rrg+ o5HLChwLGTr0rt0P3re/MwGZnuW8sh4JZOAz7fy2u9gblR/H46BOr3zTNbRKg1KG8m yTLg2ujOlaA/Mg/UNMhSYIP7rE0PKmdaQEHWY26LyqOs0bc8cBxFdFYsjG3QLRgJIS kuyUpenXFdUaw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4VBL3S5RqJz4wcv; Sat, 6 Apr 2024 14:11:16 +1100 (AEDT) Date: Sat, 6 Apr 2024 14:06:39 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 3/4] Split "auto" compression mode into its own path Message-ID: References: <20240322022739.2746102-1-david@gibson.dropbear.id.au> <20240322022739.2746102-4-david@gibson.dropbear.id.au> <20240405201002.48d48651@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s1ZA5EsY4anycCBI" Content-Disposition: inline In-Reply-To: <20240405201002.48d48651@elisabeth> Message-ID-Hash: ZKHWMAIHKTLFXDQJCWOXDRU55LN4EG46 X-Message-ID-Hash: ZKHWMAIHKTLFXDQJCWOXDRU55LN4EG46 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: lvivier@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --s1ZA5EsY4anycCBI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 05, 2024 at 08:10:02PM +0200, Stefano Brivio wrote: > On Fri, 22 Mar 2024 13:27:38 +1100 > David Gibson wrote: >=20 > > mbuto supports "auto" compression mode where we detect the fastest > > compressor and use it. This is structured a bit oddly - cpio_compress() > > first handles the case of an explicitly selected compressor, then handl= es > > the auto-detected case, redundantly actually implementing the compressi= on > > once it has picked one. >=20 > Yes, we don't want to risk keeping around several formats if the > archives are big... but you're not changing this, right? I don't believe so, no. > > Make this a bit clearer: first handle the "auto" case by calling out to > > the testing code, and using that to set the parameter for the specific > > compression path. > >=20 > > Signed-off-by: David Gibson > > --- > > mbuto | 53 ++++++++++++++++++++++++----------------------------- > > 1 file changed, 24 insertions(+), 29 deletions(-) > >=20 > > diff --git a/mbuto b/mbuto > > index 49d032c..550f76e 100755 > > --- a/mbuto > > +++ b/mbuto > > @@ -566,31 +566,11 @@ cpio_init() { > > fi > > } > > =20 > > -# cpio_compress() - Compress archive, test available methods if none i= s selected > > +# compress_select() - Try compressors and pick the fastest >=20 > Now we can say we pick the fastest, but it's not clear in what: we care > about decompression, so perhaps: >=20 > # compress_select() - Try compressors and pick the fastest to decompress = image >=20 > ? I don't think that's accurate. AFAICT the code is selecting the fastest to compress, not decompress, and I didn't change that. I agree that optimizing decompression speed would make more sense. Honestly, I'm not really convinced that the auto mode is useful anyway: even if we changed to decompression speed, the speed on the location running mbuto isn't necessarily the same as on the target doing the decompression (though given mbuto's usage model, it's lkely). --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --s1ZA5EsY4anycCBI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmYQvDQACgkQzQJF27ox 2Ge+WA/+I1KXQpTsoKQxOA24Ni9n2p/Elfxklz2ZEozGZoeU2wmPhNIEyEpmfjSR bfLU6JuPHOik78umrUYWZ9YmXN/DgNxyp6CMQMsR1vZAspidoPYZiOpI9XzwlfMI 9iR53rj04iZ/1YxIwy1oONdeRV8qA9srrGdTzIpOYssB9K+0YonDdc0kIwbQVyqH 79U1IqjXP9v+j2/f7OhUd1ZoZD5IgeaY03ERzc+Ros2tkn8z7LSFI7XX71M39J7z 1vj1hV+sYN72s7k5m0kYRE9MTD/scf2ZSF+r151mQzBu0x29Frp5VcUYbJt73q+q dzHpmEnHF0aMDZwO7mGcgg/cxR+ipBCHEsU8Onsm36EVA6xmkBKOd/l1NHvBiFKX lc50pR8WhRUMg6ODyTSHgZNcr1q6K6DsYgm5qwb7KmFz+qKX1YNg49xHu+IkHOgZ vO60CvROQxaKq970AH3cLYiQXxXr+lW5oFbRvq/TwruWOkBb8rMihcEBc2IZnhWW GXpdIIOFGmbbMtJa1PAjA5+22SR5xCbPqE93hFxU/mmoGBFrXzaeUn2OUatBd2RZ RjjecNrsEFiIi5G+4aE0vdJRzLP1ydcVEqIFNSoRIxkR/FqJGp+T0rI3gc+LDas9 NW92jHZYUbMKsy5eTvjJPPjwnlV/ziQYkEZBGtWdk5xalv+mRWQ= =gkhn -----END PGP SIGNATURE----- --s1ZA5EsY4anycCBI--