Re: [PATCH RFC] x86: Add CONFIG_KERNEL_UNCOMPRESSED support
From: Ingo Molnar
Date: Sun Feb 23 2025 - 13:34:13 EST
* Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> > But I wasn't sure how to wire that up in a nice way. I guess the
> > nicest option would be to create a separate kconfig variable for
> > the compression level to use for any cmd_lz4/cmd_lz4_with_size
> > invocations in the build process; and then maybe only make this
> > option visible if LZ4 is selected as kernel compression method?
> >
> > Another option would be to create a new option in the "Kernel
> > compression mode" choice menu with a name like "LZ4 (fast)", turn
> > CONFIG_KERNEL_LZ4 into an internal flag that is selected by both
> > LZ4 variants shown in the choice menu, and duplicate some of the
> > make rules, but that seems overly complicated.
> >
>
> I didn't realise that KERNEL_UNCOMPRESSED already exists and you are
> just wiring it up for x86. But I still think that we should avoid
> that, not only because it is yet another bzImage format but also
> because I still see a 3x size reduction even with the fastest
> setting.
>
> I think adding one Kconfig symbol that depends on KERNEL_LZ4 and
> switches from -9 to -1 for LZ4 only is reasonable.
Maybe a CONFIG_COMPRESS_FAST option that maps to and enables the
current fastest compressor? Then we can also add LZ4_FAST and map it to
it. (And if a future fastest compressor is added it can change this
mapping.) Or something like that?
And if there's still a measurable difference in total build time (say
larger than 1%) from doing it all uncompressed, then I think we should
go with Jann's original patch that hooks up zero-compression on x86. It
doesn't look overly complicated.
Thanks,
Ingo