All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Gorbik <gor@linux.ibm.com>
To: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Cc: linux-kernel@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH] s390/boot: add zstd support
Date: Wed, 16 Jun 2021 01:19:56 +0200	[thread overview]
Message-ID: <your-ad-here.call-01623799196-ext-1245@work.hours> (raw)
In-Reply-To: <20210615114150.325080-1-dimitri.ledkov@canonical.com>

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@canonical.com>
> cc: Heiko Carstens <hca@linux.ibm.com>
> cc: Vasily Gorbik <gor@linux.ibm.com>
> cc: Christian Borntraeger <borntraeger@de.ibm.com>
> cc: linux-s390@vger.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

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.
"""

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!

  reply	other threads:[~2021-06-15 23:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 11:41 [PATCH] s390/boot: add zstd support Dimitri John Ledkov
2021-06-15 23:19 ` Vasily Gorbik [this message]
2021-06-16  7:34   ` Dimitri John Ledkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=your-ad-here.call-01623799196-ext-1245@work.hours \
    --to=gor@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=dimitri.ledkov@canonical.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.