Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60CECC3DA7A for ; Mon, 2 Jan 2023 16:30:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 137DB852E5; Mon, 2 Jan 2023 17:30:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="tHHWAakP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E34988523B; Mon, 2 Jan 2023 17:30:13 +0100 (CET) Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9161D85422 for ; Mon, 2 Jan 2023 17:30:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf29.google.com with SMTP id d13so19926776qvj.8 for ; Mon, 02 Jan 2023 08:30:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jjHmIl0LgXAGVOM3JT0XAm0kCGP5bt3dWs3fuJqt1p0=; b=tHHWAakPr+WPade53gpaVmKVaqXE7SUmp66isjszzOZi88hSMkW4UNlQ0ptBtsCrpR scZ/UB/KbU9pTkM35r59IIrL7zYA7qddI9X8iv1Ssbt6DrwAC6sZVfykn0gtScsnuE1T x/3DObDtSl7d1J1mbRgKXg1i3B4Pt7HTjlBGo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jjHmIl0LgXAGVOM3JT0XAm0kCGP5bt3dWs3fuJqt1p0=; b=kd+2l+Ip5OtcsX4tQbU3MUVmHXLA/cOaga/fYqDffiIsXU9r0wvo14M+yFEArxxpUa kL6d1RJT9PksgPfxG9O4ckyFKvWM0Rzk5+z0zcVZdUGV0Y7C6845lcSQcGmw+sxYJ2UD avKScWFoms8jn1a3H6ptG6YGvv8H+ngZvYVLEWb/NygAezaBYez7jr9AEBSdD5HoHffU RU63OsZeoKAXJHyoQydHssuu7+M21+ddI1+ArOQXoNJ9e6bd6wfznX/pwfzbcvKB/OaL 6otdPgHUs7IfIKrOAT5Y+4u/+eH40aX5HCwxFo9Gd2tP5lVXhLuGCtJZql06+f2zBkzp 2f3Q== X-Gm-Message-State: AFqh2kpjpQGfzBxnDABvkL0joOSwjZ3OyRg8xZmTOpP2Bbe4eY66jkBe 1eJvpSzrN3KXU28BySRBP1jqTw== X-Google-Smtp-Source: AMrXdXvpwlL4QyWzsoOnfGoL5xJETJtxq4Y+Wabi/QfqxBzJuMWuQq7l8qVRTRp2AKDi9s3M1hfwww== X-Received: by 2002:a0c:fac4:0:b0:531:c0a1:5bf1 with SMTP id p4-20020a0cfac4000000b00531c0a15bf1mr9122967qvo.12.1672677009203; Mon, 02 Jan 2023 08:30:09 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-f07c-6bfd-45cd-2c23.res6.spectrum.com. [2603:6081:7b00:6400:f07c:6bfd:45cd:2c23]) by smtp.gmail.com with ESMTPSA id bs7-20020a05620a470700b006b61b2cb1d2sm21150707qkb.46.2023.01.02.08.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 08:30:08 -0800 (PST) Date: Mon, 2 Jan 2023 11:30:06 -0500 From: Tom Rini To: "Maier, Brandon L Collins" Cc: Simon Glass , "u-boot@lists.denx.de" Subject: Re: [PATCH v2 1/2] lib: zstd: update to latest Linux zstd 1.5.2 Message-ID: <20230102163006.GM3787616@bill-the-cat> References: <20221227144613.48752-1-brandon.maier@collins.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RkEgLtqHOdhPjaQN" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --RkEgLtqHOdhPjaQN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 02, 2023 at 04:02:06PM +0000, Maier, Brandon L = Collins wrote: > Hello Simon, >=20 > > -----Original Message----- > > From: Simon Glass > > > > > > > $ buildman -b zstd2 --boards dh_imx6,m53menlo,mvebu_espressobin- > > 88f3720,sandbox,sandbox64,stm32mp15_dhcom_basic,stm32mp15_dhcor_basi > > c,turris_mox,turris_omnia -sS > > > > Summary of 3 commits for 9 boards (8 threads, 1 job per thread) > > > > 01: Merge tag 'tpm-23122022' of > > https://urldefense.com/v3/__https://source.denx.de/u-boot/custodians/u- > > boot-tpm__;!!MvWE!SiCDjQxi4IOlpR2LYEviKe- > > 1_MQirGfhHKYya94BvpeZgxBZ1YBd84kMf-FR0-VX0pY$ > > > > arm: w+ m53menlo dh_imx6 > > > > 02: lib: zstd: update to latest Linux zstd 1.5.2 > > > > aarch64: (for 2/2 boards) all +535.5 rodata +965.5 text -430.0 > > > > arm: (for 5/5 boards) all +4489.6 rodata +940.0 text +3549.6 > >=20 > > That's a pretty stiff penalty. Do you know what has changed? Does it > > support a lot more optional features? If so, could we make it optional > > (even if default y)? > >=20 > =20 >=20 > I understand Linux replaced their custom zstd code with the Facebook zstd= code, so the changes are widespread. The new zstd does support many option= al performance features as documented in zstd's lib/README[1], which I have= already added a KConfig to disable all of them in this patch. For referenc= e, if I enable the performance options the build size increases as so: >=20 > aarch64: (for 2/2 boards) all +27432.0 rodata +320.0 text +27112.0 > arm: (for 5/5 boards) all +21801.6 rodata +256.0 text +21545.6 > sandbox: (for 2/2 boards) all +59004.0 bss +16.0 rodata +800.0 text +5= 8188.0 >=20 > I haven't had any luck finding another way to decrease build size. >=20 > [1] https://github.com/facebook/zstd/blob/dev/lib/README.md#modular-build After skimming over that, did you see if not disabling inlining, and letting the compiler figure it out is a big size penalty? Also, while the arch-level details are good, a specific platform set of numbers instead might give some ideas on where maybe reductions could come from. Finally, what is the whole list of platforms that grow? It's all not ideal, yes, but it looks like BTRFS is the main user, right now, which isn't widely enabled. So maybe we can look towards improving upstream a bit here, if motivated. --=20 Tom --RkEgLtqHOdhPjaQN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOzBoYACgkQFHw5/5Y0 tyx37Av/dmiWlp8iP2hnzAYvoHRZBtJD7QPGevQfdYqqUj+dRKIr9iyDRykc3+W5 V0bv1DJBlCEfkB/gspxLvLrVN56CVdopROaBa9Ur2U0UfBBBAlQE4qF/rN4xIbRV GX7Ml0SLd3D6Su9fzVgn6lsaG3TZATJj4Lx92DNET5riPwx9zRx9VKYvN9qIF2aw 45agoIsdPU4CKezv73OPtzDzGhM4sqZXULlNu1qqxsuI9LloK6ttN3+7FZk3tqBS GzVsTY9coCu+pJ2FsPIAq5LR+Bvp5iLlhROiG6a3Cad5j/fqPPiH6iXxjL01KxMR DyHoWIRIvHJ95xWAfEUpB+6rzmuXY8pKCt9QW8qy9r6yLiMigxgLxoozxeAHbH6i c08x+WcjJMFzYe20BpSPSzYkTc8LXSai2q0gbrM/xEdJhnPJSePvv1CHKBMDKYig uDIi08j4hMxbcq6qEX/fDWvlqP1vOLCf7vuHbQ8Vej3u9r3fsSyHmodE+vk8iXBg nxmSCzuj =3Mvl -----END PGP SIGNATURE----- --RkEgLtqHOdhPjaQN--