Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp226774pxj; Wed, 16 Jun 2021 00:39:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6BI32m4OCU/D+FnbLQrl/OLawzYqTzkE2TEgujqdSNrPX+O+5a6rO+uefbgCFnnxMJQko X-Received: by 2002:a05:6402:4315:: with SMTP id m21mr2513197edc.39.1623829144592; Wed, 16 Jun 2021 00:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623829144; cv=none; d=google.com; s=arc-20160816; b=Ov68FNnnFTFnFl2YALrk+QfMz6SHdzjzHnsyAncU0sxhC7PnCIuWK2rylFxJ52+GQV agVzUa74FzTqopgnkiVTgjsedtB3vbkgQSYXSDQ73LYZLbuFbYSiZWZYMNCqSUE/+2wI 5a5YLw7bPjNqLCzTxuYjt8AFwl/zDTm88mY1TPgq2cN9EEATUyTALHAz4K51CAdqu1aV 2k+Uh8ZRGLF3xVkDcWTrO9KMb6yBKIhay5cYhrT363R4KrBtNUgTahWvd9BBaANpViGq Ih+xl6tMonuvTvkSPf87iqGUVSdLGkAP+oMgcBxzfGI3hKq+Zl6aGe1CREV8fDSQYD2O c26w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=zCv5taiiINLmRcYNh2cZYkv+GwtyeEEw74jPnQvzmFU=; b=cYrFqoG4PkKHoZU7iM0zz2JRbBHkDtlRpzSWwnaasLp2oZGwade5jT4E67WYmfFBSF nh26sz4AX3/O2Hp1DJ8qjnaGOcl8OiCd4sFzZi96lmMAdJJrtnQZUfjaKyCR594roKe1 qD4ht+AnV5uxKO+dLrMZeSYChTgmbaD83NvlES57+Wt0dMOGD3Q5A+3VvjmF2wW/p9va lvpPe/6HxBvnU+18Hp2FzqgEhTLZDp5Go9B42lf9P07Gb4c/vb7ihlmpoZwxo+3nlyzR xRRLKJtYX7GyLt8g9asDr2FnJNZ6LD+WoWGLIi5lwIpI8TQQy43ELWgUVyzpU/CnJfui DU2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si1776281edb.554.2021.06.16.00.38.41; Wed, 16 Jun 2021 00:39:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231727AbhFPHhm (ORCPT + 99 others); Wed, 16 Jun 2021 03:37:42 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57745 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbhFPHhl (ORCPT ); Wed, 16 Jun 2021 03:37:41 -0400 Received: from mail-io1-f72.google.com ([209.85.166.72]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1ltQ5H-0006NJ-Cs for linux-kernel@vger.kernel.org; Wed, 16 Jun 2021 07:35:35 +0000 Received: by mail-io1-f72.google.com with SMTP id e23-20020a6bf1170000b02904d7ff72e203so1334297iog.0 for ; Wed, 16 Jun 2021 00:35:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zCv5taiiINLmRcYNh2cZYkv+GwtyeEEw74jPnQvzmFU=; b=Ju7BNmEKOhHFLrko8s6lsEOgHyZC7F0yNNvdaBDzXfKxh+ka//JhMrKK91unuVKHj+ 3N7mqYMynjXuUNPILz0SLSYYWp53/xeXrlnuMgxqaeniaD8myFnxAEjwabaXHj6i4d6v 7n6T4CPNrwsc/4r3aQ1w/JUB9HG2s2FvTg4y7R08IOWEHsybYTPqTbcNXMOYPTG7YMXU mhyOwmCgtNgyOikQWvLJOkjKwDLQubRZFQoF8MqiQgY4rwL13BnLHaFpNfoHWwJ4gzkZ efJZlD9Rr9IHU8jFWumbOk9x5IAxr1LDipKfqTF0P0QnvU07dAu/C+oQW9aAMAeoCTb/ /H8Q== X-Gm-Message-State: AOAM532L3T737L49IjhCygtP+Dgn8c6/UFj3MzKpY8rHZPlDoG3U+jci OFCb2KnDTxYrhWQgAHyBvTr1pbGHTEc5/p26w2i7FKUDoL5sXhFMzwR9j3OVP9gnZU6dPRc74ul LM2//u9lvqIVkPdgcUK5koWhRJ6YJQpStIncXywBeRZ+vAmDl8eaa7/FWxQ== X-Received: by 2002:a92:c56d:: with SMTP id b13mr2674027ilj.267.1623828934478; Wed, 16 Jun 2021 00:35:34 -0700 (PDT) X-Received: by 2002:a92:c56d:: with SMTP id b13mr2674013ilj.267.1623828934257; Wed, 16 Jun 2021 00:35:34 -0700 (PDT) MIME-Version: 1.0 References: <20210615114150.325080-1-dimitri.ledkov@canonical.com> In-Reply-To: From: Dimitri John Ledkov Date: Wed, 16 Jun 2021 08:34:58 +0100 Message-ID: Subject: Re: [PATCH] s390/boot: add zstd support To: Vasily Gorbik Cc: linux-kernel@vger.kernel.org, Heiko Carstens , Christian Borntraeger , linux-s390@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 16, 2021 at 12:20 AM Vasily Gorbik 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 > > cc: Heiko Carstens > > cc: Vasily Gorbik > > cc: Christian Borntraeger > > 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 > 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.