Re: [PATCH] lib: zstd: update to latest Linux zstd 1.5.7

Tom Rini <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <20260814232033.GM3297518@bill-the-cat>
On Fri, Aug 14, 2026 at 10:37:00PM +0000, Cole Munz wrote:
> Thanks, buildman -B localises it well, and there is an easy win in it.
> 
> Almost all the growth is the new Huffman fast-decode path in 1.5.7. turris_mox
> and mvebu_espressobin-88f3720 give identical breakdowns, text +1896 rodata +24:
> 
>   HUF_decompress4X1_usingDTable_internal                 -    1508   +1508
>   HUF_readDTableX1_wksp                                  8    1312   +1304
>   HUF_decompress4X1_usingDTable_internal_fast_c_loop     -    1092   +1092
>   FSE_decompress_wksp_bmi2                               4     316    +312
> 
> Upstream guards that path with HUF_DISABLE_FAST_DECODE. Adding it to the
> CONFIG_ZSTD_LIB_MINIFY flags in lib/zstd/Makefile, beside the
> HUF_FORCE_DECOMPRESS_X1 and DYNAMIC_BMI2=0 already there, takes turris_mox from
> +1920 to +236 bytes against 1.5.2. Sandbox ut lib still passes 133 tests with 0
> failures, including both zstd cases.
> 
> Trading decode speed for size is what MINIFY is for, so it looks like it
> belongs there rather than on by default.
> 
> Want that as a separate patch on top? I did not fold it in because it changes
> behaviour for existing MINIFY users, not just the library version.

It looks like HUF_DISABLE_FAST_DECODE is a new symbol, so yes, please
respin with that being used under CONFIG_ZSTD_LIB_MINIFY, thanks!

-- 
Tom
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCan+ivQAKCRAr4qD1Cr/k
CoO7AQCdZNHctc6COlqCMv8rYcqEiXnB1QbEb02jei1YXtkqfAD/Y3akHgzAv5c6
0YxO7Y9BtBELZ/US+y4A/KKLpngENAI=
=WcVX
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.