Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1171393imm; Fri, 17 Aug 2018 13:09:21 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzYxr79kmdKk5Yny98nkJ3ea5bALgZY8BeSAaahmNJPGBb8Xc+ruoAGINj67BBTUNuwh0Dq X-Received: by 2002:a17:902:f20f:: with SMTP id gn15mr4612370plb.173.1534536561460; Fri, 17 Aug 2018 13:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534536561; cv=none; d=google.com; s=arc-20160816; b=w9Mh1PFxZ4KeH78TzMPWYGvtuJ/lpl5vtJP4yqHSZwIn3elVifSCwyz2S4xL1AEluA sb5P4N/1inZkX0HGBKWiqMTUJBMi+2TGVR/8g68dk/N0xc51E4l7kOdpa6Po6iyULitq mOo5P/rZi8srenRaBjhJfamUaQ2On+7jitl1pgMn2ZmS2UfQGlX8ykG8GUGzjR+nwWDQ OnvR7gu4zXsYphIS5Wedvvbbst0JLLuG3QdWd74RASEWXfC930XfT52KfOZXgjvCJ2Bk vl1L9fBgr3k1IRY2vDlEARR7XA8UwmSbO5QNk+23ej9YajDQYffA5RmibKEp4Y3cWLIs ZOIA== 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 :arc-authentication-results; bh=U5s+/PiqRfBQt2EpdPOuFYbV6zY40CTaWOj9EzT6CMM=; b=s7KNM6FSw/ZFhOsAboWR10YCDl6tniGKrOGkAs+KR712vQ/xEub27KVMdtZ3JESVau r2OgyoCoj6tewSJAJqnyzDpH65ARpF0pBh6vbbdiNAY3hSG/JAsImIB9seA2IKbc8FZS FdWaSNl2UnmztLbBcMRypR5KVHUrboWP+dwdh1uw3nnej0e+0Ao/O7jeEIpC/0bUCZ++ mc+pg719Yqd10fuVJ1NJyqbjoCoqWSwZ9qPHHANshtvrjQIKWN9pSn9uCLpBw0+bhs5Y uGSKSqx4PMjSxQ7Ja0yHD4Xi1o1ZSaBtlXNN87HIIwWw4Lhi3UXEy2zUVmwQ07UDrcNT uzIg== 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 e67-v6si2774441plb.272.2018.08.17.13.09.05; Fri, 17 Aug 2018 13:09:21 -0700 (PDT) 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 S1726311AbeHQXMq (ORCPT + 99 others); Fri, 17 Aug 2018 19:12:46 -0400 Received: from tartarus.angband.pl ([89.206.35.136]:58450 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbeHQXMq (ORCPT ); Fri, 17 Aug 2018 19:12:46 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.89) (envelope-from ) id 1fql2B-0007L2-I0; Fri, 17 Aug 2018 22:07:47 +0200 Date: Fri, 17 Aug 2018 22:07:47 +0200 From: Adam Borowski To: Andi Kleen Cc: =?iso-8859-1?Q?Ren=E9?= Rebe , Nick Terrell , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , Kernel Team , Chris Mason , Julian Andres Klode Subject: Re: [RESEND PATCH v2 0/2] Add support for ZSTD-compressed kernel Message-ID: <20180817200747.bzmsl5nfwewyksvg@angband.pl> References: <20180322012943.4145794-1-terrelln@fb.com> <5B282FAD-EDCF-44C8-A131-A3C6FF3EA84F@fb.com> <3F598446-EA1D-47CE-B7A1-4D3002DA3972@exactcode.com> <8DE2BD14-0C9C-43AF-B9B7-F760F8434B6B@exactcode.com> <20180817165403.GC12066@tassilo.jf.intel.com> <20180817175746.d2brxipp7xa4y2uw@angband.pl> <20180817192244.GF12066@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180817192244.GF12066@tassilo.jf.intel.com> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: NeoMutt/20170113 (1.7.2) 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, Aug 17, 2018 at 12:22:44PM -0700, Andi Kleen wrote: > On Fri, Aug 17, 2018 at 07:57:46PM +0200, Adam Borowski wrote: > > > The "favourite compressor" seems to roughly change every year, so if > > > we keep adding new ones things will get more and more convoluted. > > > > The above patchset drops just bzip2. It is the only one that's strictly > > beaten in every way (ratio, time, memory usage), there are also no other > > Does time include build time? I've been reverting back to gzip recently > because I care very much about that. Too lazy to benchmark a kernel image (IIRC Nick Terrell posted that a while ago), here's copypasta of a random 16824672 byte executable, in userspace, with default level setting: comp decomp size xz 8.038s 0.356s 4320292 bz2 2.265s 0.730s 5234516 zst 0.274s 0.102s 5657626 gz 0.880s 0.152s 6515505 Z 0.499s 0.133s 8932459 lzo 0.100s 0.095s 9198874 As you can see, zstd's compression time is drastically better than gzip, while ratio is better. The default level is very low (-3 on -1..-22 scale) but you can crank it up for stronger compression. The defaults fit your use case. > > uses of bzip2 anywhere in the kernel so we'd get to drop its code > > completely: 900 lines of Linus' happiness. > > Great! > > > Other candidates are lzo and bare lzma (you want lz4, zstd or xz instead), > > but those are used elsewhere thus there's hardly any gain. If you want them > > gone, please say so -- I'll include their droppage. > > Yes would be good to remove the kernel image support for those too > just to simplify the config process, even if it doesn't save much code. There's one caveat: fast choices are quite new: * lz4 userspace tools are not even in current Debian stable (just unstable) * uncompressed kernel got in only this merge window * zstd has userspace tools in Debian stable but is not merged into the kernel yet (other dists are probably similar) Thus, it might be a good idea to keep lzo for a while longer. Bare lzma can probably go -- xz filters are nice for binaries of archs it knows (disabled otherwise), and lack of header requires hacks to find out the payload's size. So it's up to you guys: do you want me to drop lzo and/or lzma? We can also drop them just for vmlinuz but not initrd. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ What Would Jesus Do, MUD/MMORPG edition: ⣾⠁⢰⠒⠀⣿⡁ • multiplay with an admin char to benefit your mortal [Mt3:16-17] ⢿⡄⠘⠷⠚⠋⠀ • abuse item cloning bugs [Mt14:17-20, Mt15:34-37] ⠈⠳⣄⠀⠀⠀⠀ • use glitches to walk on water [Mt14:25-26]