[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADWks+bB2YsATLMaPvhtu6MoFsveKYd5cY6GxepeX7OZvto-Ew@mail.gmail.com>
Date: Wed, 16 Jun 2021 08:34:58 +0100
From: Dimitri John Ledkov <dimitri.ledkov@...onical.com>
To: Vasily Gorbik <gor@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
linux-s390@...r.kernel.org
Subject: Re: [PATCH] s390/boot: add zstd support
On Wed, Jun 16, 2021 at 12:20 AM Vasily Gorbik <gor@...ux.ibm.com> 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@...onical.com>
> > cc: Heiko Carstens <hca@...ux.ibm.com>
> > cc: Vasily Gorbik <gor@...ux.ibm.com>
> > cc: Christian Borntraeger <borntraeger@...ibm.com>
> > cc: linux-s390@...r.kernel.org
> > ---
> > 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.
Powered by blists - more mailing lists