Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1110296imu; Fri, 9 Nov 2018 11:05:23 -0800 (PST) X-Google-Smtp-Source: AJdET5fTYwGNe7JHJOD96YHghBrXeMde1qOSxGcS7T1PENbdbBC8S0D8iWny8hNZavwO0EBNB7ME X-Received: by 2002:a17:902:bd0b:: with SMTP id p11-v6mr9978316pls.35.1541790323204; Fri, 09 Nov 2018 11:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541790323; cv=none; d=google.com; s=arc-20160816; b=nsL8Jx0iTqEMpg8D7dJqNEiAFgV3u5dQOiyfH/vxoao5SA2MSFcZRV2c9SdlU+83PZ W1aaCzW6XBMU1wVHJ5wgff1zhiAUUfl5LzROZxxuOjgfQRVl5CMg5Pn2mOcwIoVE/fWe fTugHGEyuPoA+ChaLOy7kigrg+Sbhgbx55jMagrahvmdFhPJ4wtUy8jC2lt+dfCHyxLM Aw3VrwfnaipgnkJOD/XGwDtEFmjMZsYpVVc0YPpub0eyCFGHK7d/J1tFbXB36ToGWU0A gasYFk5ZhbYvsJwe/OS+eORki892zaRGKuGtOn6d//rfm65uTKhF28b+6X+nXlZejxvx +v5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=LgCCZrSJED5mPE5yKKtN8mGLXKzoDM+ERBDKxqvnrc0=; b=SnJ3S/Z7EOeHjgst/NsCZDbLiyEl8LtC8tOkPcyDpFT4p8QQQ88gg3hyDsCYAGcZd8 9v1Z7BAMxLreL+6g56UrNoD7TbxsPTF61uvSiesDy1d+LXPmauxz/ICISxZAfhr2oJlI XEcKq5+jJ7CZIyujb/JjPJXxR1Is3jsAF08e4YyvxTlPWPZRwbi9puREttDVU3PhcN1B JXkc4X2XtJDS+i8o36fybIRozz3vvQPeb08yNdMed5XY9q1C42tmknrTxUu5+ei8lvwT iHaTZRwSV6Yxs4TIHYLJIqgY58GYRMVw/Ug3en8atmeCnb9E8A61Jkw1Ck9QIckQKb5J S67Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b21-v6si8609981pfo.130.2018.11.09.11.04.51; Fri, 09 Nov 2018 11:05:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729124AbeKJEqD (ORCPT + 99 others); Fri, 9 Nov 2018 23:46:03 -0500 Received: from tartarus.angband.pl ([54.37.238.230]:51840 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729023AbeKJEpf (ORCPT ); Fri, 9 Nov 2018 23:45:35 -0500 Received: from 89-64-163-218.dynamic.chello.pl ([89.64.163.218] helo=barad-dur.angband.pl) by tartarus.angband.pl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLC47-00058o-Kd; Fri, 09 Nov 2018 20:03:37 +0100 Received: from kholdan.angband.pl ([2001:470:64f4::5]) by barad-dur.angband.pl with smtp (Exim 4.89) (envelope-from ) id 1gLC46-0005AP-2u; Fri, 09 Nov 2018 20:03:35 +0100 Received: by kholdan.angband.pl (sSMTP sendmail emulation); Fri, 09 Nov 2018 20:03:34 +0100 From: Adam Borowski To: linux-kernel@vger.kernel.org, Nick Terrell , Russell King , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Ralf Baechle , Paul Burton , James Hogan , linux-mips@linux-mips.org, Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Cc: Adam Borowski Date: Fri, 9 Nov 2018 20:03:03 +0100 Message-Id: <20181109190304.8573-16-kilobyte@angband.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181109190304.8573-1-kilobyte@angband.pl> References: <20181109185953.xwyelyqnygbskkxk@angband.pl> <20181109190304.8573-1-kilobyte@angband.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 89.64.163.218 X-SA-Exim-Mail-From: kilobyte@angband.pl X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tartarus.angband.pl X-Spam-Level: X-Spam-Status: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1,BAYES_00=-1.9, TVD_RCVD_IP=0.001 autolearn=ham autolearn_force=no languages=en Subject: [PATCH 16/17] Kconfig: Update the prose for selection of compression algorithm X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on tartarus.angband.pl) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It was really obsolete, and some entries contradicted each other. Let's not recommend ZSTD for kernel compression yet as it's available only on x86, and some distros might not have the tool installed. Proposing ZSTD for initrd is safer but let's test it first. Signed-off-by: Adam Borowski --- init/Kconfig | 25 +++++++++++++------------ usr/Kconfig | 24 +++++++++++------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 412ba93673fa..7c0180c41a3c 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -153,26 +153,27 @@ choice version of this functionality (bzip2 only), for 2.4, was supplied by Christian Ludwig) - High compression options are mostly useful for users, who - are low on disk space (embedded systems), but for whom ram - size matters less. + High compression options tend to be more useful in most cases, + as bootloaders are often egregiously slow to read the kernel + from the disk/SD card/network/etc, overcoming any boot time + savings you would get from faster decompression. - If in doubt, select 'gzip' + If in doubt, select 'xz' config KERNEL_GZIP bool "Gzip" depends on HAVE_KERNEL_GZIP help - The old and tried gzip compression. It provides a good balance - between compression ratio and decompression speed. + The old and tried gzip compression. You generally want it if + some tool you use doesn't support more modern compressors. config KERNEL_LZMA bool "LZMA" depends on HAVE_KERNEL_LZMA help - This compression algorithm's ratio is best. Decompression speed - is between gzip and bzip2. Compression is slowest. - The kernel size is about 33% smaller with LZMA in comparison to gzip. + An old version of xz, like it providing strong compression at slow + speed. It lacks a header and support for filters or uncompressed + blocks, thus it's usually better to pick xz. config KERNEL_XZ bool "XZ" @@ -193,9 +194,9 @@ config KERNEL_LZO bool "LZO" depends on HAVE_KERNEL_LZO help - Its compression ratio is the poorest among the choices. The kernel - size is about 10% bigger than gzip; however its speed - (both compression and decompression) is the fastest. + Its compression ratio is pretty poor (but still better than + LZ4). You want to pick ZSTD (similar speed but much better + compression) or LZ4 (much better speed) instead. config KERNEL_LZ4 bool "LZ4" diff --git a/usr/Kconfig b/usr/Kconfig index 8d99edacabc9..f6e871585f05 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -131,17 +131,15 @@ config INITRAMFS_COMPRESSION_NONE on those architectures that support this. However, not compressing the initramfs may lead to slightly higher memory consumption during a short time at boot, while both the cpio image and the unpacked - filesystem image will be present in memory simultaneously + filesystem image will be present in memory simultaneously. config INITRAMFS_COMPRESSION_GZIP bool "Gzip" depends on RD_GZIP help - Use the old and well tested gzip compression algorithm. Gzip provides - a good balance between compression ratio and decompression speed and - has a reasonable compression speed. It is also more likely to be - supported by your build system as the gzip tool is present by default - on most distros. + Use the old and well tested gzip compression algorithm. Gzip doesn't + provide very good compression nor speed, but it's the safest choice, + with wide support. config INITRAMFS_COMPRESSION_XZ bool "XZ" @@ -150,20 +148,20 @@ config INITRAMFS_COMPRESSION_XZ XZ uses the LZMA2 algorithm and has a large dictionary which may cause problems on memory constrained systems. The initramfs size is about 30% smaller with XZ in comparison to gzip. Decompression speed is - better than that of bzip2 but worse than gzip and LZO. Compression is - slow. + okayish but still slowest of all currently available algorithms. + Compression is slow. - If you choose this, keep in mind that you may need to install the xz - tool to be able to compress the initram. + Any modern distro provides xz in its default install, but on + minimal build systems you might need to install xz-utils to be + able to compress the initram. config INITRAMFS_COMPRESSION_LZO bool "LZO" depends on RD_LZO help It's compression ratio is the second poorest amongst the choices. The - kernel size is about 10% bigger than gzip. Despite that, it's - decompression speed is the second fastest and it's compression speed - is quite fast too. + kernel size is about 10% bigger than gzip. Pick ZSTD instead, or LZ4 + if speed is paramount. If you choose this, keep in mind that you may need to install the lzop tool to be able to compress the initram. -- 2.19.1