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 A0279C00A5A for ; Thu, 19 Jan 2023 14:47:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 491FC856AD; Thu, 19 Jan 2023 15:46: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=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="pLJo84t0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4483285606; Thu, 19 Jan 2023 15:45:50 +0100 (CET) Received: from mail-vk1-xa2c.google.com (mail-vk1-xa2c.google.com [IPv6:2607:f8b0:4864:20::a2c]) (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 20B4E85698 for ; Thu, 19 Jan 2023 15:45:47 +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-vk1-xa2c.google.com with SMTP id e132so1020145vke.11 for ; Thu, 19 Jan 2023 06:45:47 -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=F5jcQy39xqyWUj6/L/dvbhheD3ymRTPha618upO6CBI=; b=pLJo84t0aDMOg26jzopC9Mn+kcQ73q9b+8fVIkIpg5JbExgoZDHociKkFS9DGrAoji lns4ggLW89dIxKGIykCPD0N3DlOSFcwmXvFT+dkBoq8CaV/dsUZ4UbasUBnv2tXnJeEm J0Z7A3MMQgJFhyEI7OtySidcbMj0ilnoeC0ic= 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=F5jcQy39xqyWUj6/L/dvbhheD3ymRTPha618upO6CBI=; b=vEbhvR/N1Un9/6D6B+ug1DyQtby/MNWOL0NDuGV5bJ/F4/Jf3kWq87Ex4Ukqnog+pC uykm3QFgD4KpA/BjLDcjm3eWuOz9mL5MTn7ytfTAv1Nak0m6LuzDF5kUyOJsZBuLg87y aZDKOocA+MCYzA4aHMnm8fboT2ge9/Hn7qkbWoeHXJrJXz74AOhASiMaydrajOwpmxGv wJDFzbzDOQcwCgyrMAG9d1fM5GP3wIVX9xqVq7oP2h+J34/K8VtYpwa/GCljpXIqLMPG rtvVbl2xIiueL8lIbvVs17iW0xdzu3SH4XOhxCkWtG9iyyMD/tdOSq97SWhlqjIRlRM8 lBkg== X-Gm-Message-State: AFqh2koQUshkYxQPlwncEbhwbWOHAifLUqWljP1Cp9J3PTvcB6inqt9x mjDeHDwrLSMKNrxYjNNjZhQWzw== X-Google-Smtp-Source: AMrXdXt3jxQh6OU6Qn2aMTjt1ngfZ9hXbqsm4onSJT6Ce6xgygIjjEs9NF1j0+hwkaC0ebYkBINK/w== X-Received: by 2002:a05:6122:1818:b0:3dd:fcfd:dccc with SMTP id ay24-20020a056122181800b003ddfcfddcccmr8417459vkb.5.1674139545831; Thu, 19 Jan 2023 06:45:45 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-99bd-1ec8-6b02-61e8.res6.spectrum.com. [2603:6081:7b00:6400:99bd:1ec8:6b02:61e8]) by smtp.gmail.com with ESMTPSA id h18-20020a05620a401200b00702d1c6e7bbsm9053028qko.130.2023.01.19.06.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 06:45:45 -0800 (PST) Date: Thu, 19 Jan 2023 09:45:44 -0500 From: Tom Rini To: Brandon Maier Cc: u-boot@lists.denx.de Subject: Re: [PATCH v4 1/2] lib: zstd: update to latest Linux zstd 1.5.2 Message-ID: <20230119144544.GT631605@bill-the-cat> References: <20230112162746.27767-1-brandon.maier@collins.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Hw0FrjWlp+qkNlJP" Content-Disposition: inline In-Reply-To: <20230112162746.27767-1-brandon.maier@collins.com> 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 --Hw0FrjWlp+qkNlJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 12, 2023 at 10:27:45AM -0600, Brandon Maier wrote: > Update the zstd implementation to match Linux zstd 1.5.2 from commit > 2aa14b1ab2. >=20 > This was motivated by running into decompression corruption issues when > trying to uncompress files compressed with newer versions of zstd. zstd > users also claim significantly improved decompression times with newer > zstd versions which is a side benefit. >=20 > Original zstd code was copied from Linux commit 2aa14b1ab2 which is a > custom-built implementation based on zstd 1.3.1. Linux switched to an > implementation that is a copy of the upstream zstd code in Linux commit > e0c1b49f5b, this results in a large code diff. However this should make > future updates easier along with other benefits[1]. >=20 > This commit is a straight mirror of the Linux zstd code, except to: > - update a few #include that do not translate cleanly > - linux/swab.h -> asm/byteorder.h > - linux/limits.h -> linux/kernel.h > - linux/module.h -> linux/compat.h > - remove assert() from debug.h so it doesn't conflict with u-boot's > assert() > - strip out the compressor code as was done in the previous u-boot zstd > - update existing zstd users to the new Linux zstd API > - change the #define for MEM_STATIC to use INLINE_KEYWORD for codesize > - add a new KConfig option that sets zstd build options to minify code > based on zstd's ZSTD_LIB_MINIFY[2]. >=20 > These changes were tested by booting a zstd 1.5.2 compressed kernel insid= e a > FIT. And the squashfs changes by loading a file from zstd compressed squa= shfs > with sqfsload. buildman was used to compile test other boards and check f= or > binary bloat, as follows: >=20 > > $ buildman -b zstd2 --boards dh_imx6,m53menlo,mvebu_espressobin-88f3720= ,sandbox,sandbox64,stm32mp15_dhcom_basic,stm32mp15_dhcor_basic,turris_mox,t= urris_omnia -sS > > Summary of 6 commits for 9 boards (8 threads, 1 job per thread) > > 01: Merge branch '2023-01-10-platform-updates' > > arm: w+ m53menlo dh_imx6 > > 02: lib: zstd: update to latest Linux zstd 1.5.2 > > aarch64: (for 2/2 boards) all -3186.0 rodata +920.0 text -4106.0 > > arm: (for 5/5 boards) all +1254.4 rodata +940.0 text +314.4 > > sandbox: (for 2/2 boards) all -4452.0 data -16.0 rodata +640.0 text = -5076.0 >=20 > [1] https://github.com/torvalds/linux/commit/e0c1b49f5b674cca7b10549c53b3= 791d0bbc90a8 > [2] https://github.com/facebook/zstd/blob/f302ad8811643c428c4e3498e28f53a= 0578020d3/lib/libzstd.mk#L31 >=20 > Signed-off-by: Brandon Maier Applied to u-boot/master, thanks! --=20 Tom --Hw0FrjWlp+qkNlJP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPJV5cACgkQFHw5/5Y0 tyyotAv9FGtFhcBYF172Jixbe2gFA7eb76KPiRoWuvcwjG96EmgfJ3skxcBRdChI ZaGABTq/QZDtS+deeXia0+xzA1r/X84Z4tWIvNVDKEdQBxOABfLBeygN8BxEeAJF Ud79buBW8lxBYw/g7T6doObFXO4wj233DfAO9awGxKbzqLTNtrM8m7pLfU2yEccb 29UkcuaPZoFP8oLGK7Q1wwE/q9XTa3G7SRn8+wt8U2rz585I4N6Q00ka6R6fRo1y EauCIK7g4q+sL7BLS74eM7lxn3kEVd9p90GdXXrSRZxwiX+jvK9zbRXCOnC7k/ii g745IefJwZiQd0HF5SlO91DU7BYfz7Nx1WQZsEWeUfvTR76pBKZEUnSGK+5RPfK6 T+REV5KIO3SBoPq3ERaUyxGjFO/xdlcwwDslSETTuVjKTHX/p4soeYmAw3Sd9iAI +KXaM1S0AvLycLrPir4E8/JibRSUr7NlHkhtJTLelnugkg7zShOME7qimLlQRI2M BRgTZRLl =x5TR -----END PGP SIGNATURE----- --Hw0FrjWlp+qkNlJP--