Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2208222ybh; Fri, 24 Jul 2020 07:09:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztoU7BKFTZ//jsCkDCUnOqIROK2OI/PfDzXlz5/TELSVs8Kx5I1Rn7v8Ldz+g9dVQFFDbJ X-Received: by 2002:a17:906:3984:: with SMTP id h4mr9900470eje.254.1595599756622; Fri, 24 Jul 2020 07:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595599756; cv=none; d=google.com; s=arc-20160816; b=iBI40X2CTFzJPwwsdlOnpYJzJRACt3J96K0jgVjM0L8opC/PRDv1ZT3KIG3wetiqGn C79lHECAzRv4vsMEKPyUQGbuHlrh0Xf8IxeewL4uaCehnqLf64QZP+G++IoD4zrw3kY3 boen8lE7GS9uS/SZK1ccfHRUu6y1YG7ALAOe+V8wUjwohqEPKBq/iQ3TP0uNJER0nbdR OHhcLq7MVof1+9N8UhJ89zMC4I7peSTVkd7Mw+rnA7nURbOrJygiB3AfLtwceIJDUOks qkPH/b0gWtff2WqALsvOIORqgUH12ZJmv/SmBneQ2+EE30CFY0Mxj/CRqwFl0UajM8z9 AxDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=mxI0sV9owyo+0MwBMwYVhtDQR0drPMTEODwQPk+fLe8=; b=vrYHLYZWxYI9oygFhu+wsBdX2uaHR4qVa8s9xQUE9PM/edm1R5iHEaKCbER2ZcteK5 xxrBPKSmirh9M9D26dV9nHFh1KOnPvx1y+WBB/TNuDFetLAeYo1uWKDlqXfqBUH41WDA CPckZ3x/fefzCD2pZZfF7G1JOhQQ2ngGAIAWCVESLRbZJXQQayM5EGLN5kYCkaY3/o+X yfoWpm5XqG7Oche1T/Yp66WN3AJwODX9b2qc87FEYxx1AsCzq8ylgCrOf7FeXV5Ol3Uy l4RzSMBYy8NjODveAfNzPqUxZZL8kQ/LYOcVBp6QluxaAszbNTuRlk/GnRb5XzMAzlzl qPmQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si598645edr.237.2020.07.24.07.08.51; Fri, 24 Jul 2020 07:09:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726639AbgGXOIk (ORCPT + 99 others); Fri, 24 Jul 2020 10:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbgGXOIk (ORCPT ); Fri, 24 Jul 2020 10:08:40 -0400 X-Greylist: delayed 1320 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 24 Jul 2020 07:08:40 PDT Received: from tartarus.angband.pl (tartarus.angband.pl [IPv6:2001:41d0:602:dbe::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0420DC0619D3; Fri, 24 Jul 2020 07:08:40 -0700 (PDT) Received: from kilobyte by tartarus.angband.pl with local (Exim 4.92) (envelope-from ) id 1jyy1p-00046j-W4; Fri, 24 Jul 2020 15:46:25 +0200 Date: Fri, 24 Jul 2020 15:46:25 +0200 From: Adam Borowski To: Ingo Molnar Cc: Nick Terrell , Borislav Petkov , Thomas Gleixner , linux-kernel@vger.kernel.org, Chris Mason , linux-kbuild@vger.kernel.org, x86@kernel.org, gregkh@linuxfoundation.org, Petr Malat , Kees Cook , Kernel Team , Patrick Williams , rmikey@fb.com, Patrick Williams , Sedat Dilek , Norbert Lange , Andrew Morton , Alex Xu , Arvind Sankar , Nick Terrell Subject: Re: [PATCH v8 6/7] x86: Add support for ZSTD compressed kernel Message-ID: <20200724134625.GA4100@angband.pl> References: <20200723192801.351114-1-nickrterrell@gmail.com> <20200723192801.351114-7-nickrterrell@gmail.com> <20200724122640.GC632343@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200724122640.GC632343@gmail.com> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 02:26:40PM +0200, Ingo Molnar wrote: > > -#ifdef CONFIG_KERNEL_BZIP2 > > +#if defined(CONFIG_KERNEL_BZIP2) > > # define BOOT_HEAP_SIZE 0x400000 > > -#else /* !CONFIG_KERNEL_BZIP2 */ > > +#elif defined(CONFIG_KERNEL_ZSTD) > > +# define BOOT_HEAP_SIZE 0x30000 > > +#else > > # define BOOT_HEAP_SIZE 0x10000 > > #endif > > So the other patches explain why the decompression buffer extra space > was increased from 64k to 128k, but is there a similar > calculation/estimate for bumping BOOT_HEAD_SIZE from 64k to 192k? > > Admittedly the BZ2 exception doesn't set a good example, but maybe we > can do this for ZSTD? By the way, I have a patchset on top of this, to drop BZ2 and LZMA(1) support, that should clean up this code somewhat. And bring a lot of lines of Linus happiness, as both bzip2 and lzma code are not used by anything else in the kernel, unlike lzma2 (xz). If you draw a speed-vs-size graph, at no point bzip2 or lzma are a good choice, while zstd wins by a large margin for most of the range. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ ⢿⡄⠘⠷⠚⠋⠀ It's time to migrate your Imaginary Protocol from version 4i to 6i. ⠈⠳⣄⠀⠀⠀⠀