Re: [PATCH] s390/boot: add zstd support

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

 



On Wed, Jun 16, 2021 at 12:20 AM Vasily Gorbik <gor@xxxxxxxxxxxxx> wrote:
>
> On Tue, Jun 15, 2021 at 12:41:50PM +0100, Dimitri John Ledkov wrote:
> > Enable ztsd support in s390/boot, to enable booting with zstd
> > compressed kernel when configured with CONFIG_KERNEL_ZSTD=y.
> >
> > BugLink: https://bugs.launchpad.net/bugs/1931725
> > Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@xxxxxxxxxxxxx>
> > cc: Heiko Carstens <hca@xxxxxxxxxxxxx>
> > cc: Vasily Gorbik <gor@xxxxxxxxxxxxx>
> > cc: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> > cc: linux-s390@xxxxxxxxxxxxxxx
> > ---
> >  arch/s390/Kconfig                        | 1 +
> >  arch/s390/boot/compressed/Makefile       | 4 ++++
> >  arch/s390/boot/compressed/decompressor.c | 4 ++++
> >  3 files changed, 9 insertions(+)
>
> Reviewing your patch I noticed that we use wrong condition to
> define BOOT_HEAP_SIZE. So I made a tiny fix:
>
> diff --git a/arch/s390/boot/compressed/decompressor.c b/arch/s390/boot/compressed/decompressor.c
> index 3061b11c4d27..cf2571050c68 100644
> --- a/arch/s390/boot/compressed/decompressor.c
> +++ b/arch/s390/boot/compressed/decompressor.c
> @@ -29,5 +29,5 @@ extern unsigned char _compressed_start[];
>  extern unsigned char _compressed_end[];
>
> -#ifdef CONFIG_HAVE_KERNEL_BZIP2
> +#ifdef CONFIG_KERNEL_BZIP2
>  #define BOOT_HEAP_SIZE 0x400000
>  #else
>

Nice. I guess it means all kernels were always built with large
HEAP_SIZE, and that's why my boot tests worked too.

Note this bug is also present in arch/sh/boot/compressed/misc.c.


> And applied your patch with the following changes:
> Added to the commit message:
> """
> BOOT_HEAP_SIZE is defined to 0x30000 in this case. Actual decompressor
> memory usage with allyesconfig is currently 0x26150.
> """
>

That's appropriate.

> diff --git a/arch/s390/boot/compressed/decompressor.c b/arch/s390/boot/compressed/decompressor.c
> index cf2571050c68..37a4a8d33c6c 100644
> --- a/arch/s390/boot/compressed/decompressor.c
> +++ b/arch/s390/boot/compressed/decompressor.c
> @@ -31,4 +31,6 @@ extern unsigned char _compressed_end[];
>  #ifdef CONFIG_KERNEL_BZIP2
>  #define BOOT_HEAP_SIZE 0x400000
> +#elif CONFIG_KERNEL_ZSTD
> +#define BOOT_HEAP_SIZE 0x30000
>  #else
>  #define BOOT_HEAP_SIZE 0x10000
>
> I hope you are ok with that, thanks!

Thank you!

-- 
Regards,

Dimitri.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux