Re: [PATCH 2/3] scripts: Select XZ --arm64 BCJ filter for 64-bit arm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 07, 2023 at 10:56:21AM +0200, Ahmad Fatoum wrote:
> On 06.09.23 17:08, Jules Maselbas wrote:
> > This change will select the arm64 BCJ filter for aarch64 instead of
> > the arm filter which was always selected for arm based architectures.
> > 
> > The selected filter is also tested, by looking if it is present in
> > the long help message of xz, this is because the arm64 BCJ filter is
> > a recent addition to xz.
> > 
> > Signed-off-by: Jules Maselbas <jmaselbas@xxxxxxxx>
> 
> How much of an improvement is BCJ=--arm over BCJ=""?
In my case using the --arm BCJ on a aarch64 barebox is slightly worst
than no BCJ at all.

$ xz -vkf --check=crc32 --lzma2=dict=32MiB barebox.bin
  100 %        84.7 KiB / 236.9 KiB = 0.357
$ xz -vkf --check=crc32 --arm --lzma2=dict=32MiB barebox.bin
  100 %        85.5 KiB / 236.9 KiB = 0.361
$ xz -vkf --check=crc32 --arm64 --lzma2=dict=32MiB barebox.bin
  100 %        81.0 KiB / 236.9 KiB = 0.342


> I wonder if we should fallback from --arm64 to --arm.
>  
> Cheers,
> Ahmad
> 
> > ---
> >  scripts/xz_wrap.sh | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/scripts/xz_wrap.sh b/scripts/xz_wrap.sh
> > index 7a2d372f48..5b5f3adcff 100755
> > --- a/scripts/xz_wrap.sh
> > +++ b/scripts/xz_wrap.sh
> > @@ -16,8 +16,11 @@ case $SRCARCH in
> >  	x86)            BCJ=--x86 ;;
> >  	powerpc)        BCJ=--powerpc ;;
> >  	ia64)           BCJ=--ia64; LZMA2OPTS=pb=4 ;;
> > -	arm)            BCJ=--arm ;;
> > +	arm)            BCJ=--arm$S64 ;;
> >  	sparc)          BCJ=--sparc ;;
> >  esac
> >  
> > +# clear BCJ filter if unsupported
> > +xz -H | grep -q -- $BCJ || BCJ=
> > +
> >  exec xz --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux