[PATCH v2 1/2] lib: zstd: update to latest Linux zstd 1.5.2

Maier, Brandon L Collins Brandon.Maier at collins.com
Mon Jan 2 17:02:06 CET 2023


Hello Simon,

> -----Original Message-----
> From: Simon Glass <sjg at chromium.org>
> >
> > > $ 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
> 
> 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)?
> 
 

I understand Linux replaced their custom zstd code with the Facebook zstd code, so the changes are widespread. The new zstd does support many optional 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 reference, if I enable the performance options the build size increases as so:

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 +58188.0

I haven't had any luck finding another way to decrease build size.

[1] https://github.com/facebook/zstd/blob/dev/lib/README.md#modular-build

> 
> > >    sandbox: (for 2/2 boards) all +12.0 rodata +768.0 text -756.0
> >

Thanks,
Brandon



More information about the U-Boot mailing list