Re: [PATCH 0/3] ARM ZSTD boot compression

From: J. Neuschäfer
Date: Fri Oct 27 2023 - 10:23:04 EST


On Fri, Oct 20, 2023 at 06:53:40PM +0000, Nick Terrell wrote:
> > On Oct 12, 2023, at 6:27 PM, J. Neuschäfer <j.neuschaefer@xxxxxxx> wrote:
[...]
> > In the meantime I've seen 8s for ZSTD vs. 2s for other algorithms, on
> > only mildly less ancient hardware (Hi3518A, another ARM9 SoC), so I
> > think the main culprit here was particularly bad luck in my choice of
> > test hardware.
> >
> > The inlining issues are a good point, noted for the next time I work on this.
>
> I went out and bought a Raspberry Pi 4 to test on. I’ve done some crude measurements
> and see that zstd kernel decompression is just slightly slower than gzip kernel
> decompression, and about 2x slower than lzo. In userspace decompression of the same
> file (a manually compressed kernel image) I see that zstd decompression is significantly
> faster than gzip. So it is definitely something about the preboot boot environment, or how
> the code is compiled for the preboot environment that is causing the issue.
>
> My next step is to set up qemu on my Pi to try to get some perf measurements of the
> decompression. One thing I’ve really been struggling with, and what thwarted my last
> attempts at adding ARM zstd kernel decompression, was getting preboot logs printed.

Interesting, please keep me updated if you find something out :)

> I’ve figured out I need CONFIG_DEBUG_LL=y, but I’ve yet to actually get any logs.
> And I can’t figure out how to get it working in qemu. I haven’t tried qemu on an ARM
> host with kvm, but that’s the next thing I will try.
>
> Do you happen to have any advice about how to get preboot logs in qemu? Is it
> possible only on an ARM host, or would it also be possible on an x86-64 host?

I have a patch for that, although I've only used it on real hardware,
AFAIR:

https://github.com/neuschaefer/linux/commit/f8542094e36652f2c086c76bf20584330aa27711

Assuming, you use ARCH_MULTIPLATFORM, this should help, once you enable
CONFIG_EXPERT.


Thanks

Attachment: signature.asc
Description: PGP signature