Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5145691ybl; Tue, 4 Feb 2020 08:30:40 -0800 (PST) X-Google-Smtp-Source: APXvYqyxR41BGM0gCPf5LDr8W/wBtH0epnbPGG6kYnJITjeJiP0XGTArul+KCvJls5Twb6Ewj7gm X-Received: by 2002:aca:6244:: with SMTP id w65mr3954829oib.113.1580833840492; Tue, 04 Feb 2020 08:30:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580833840; cv=none; d=google.com; s=arc-20160816; b=zWwMkQgdWlV85Ryma/AU7zKgVs1gyThzOpvRXwEpss9iZ+d8x1SVpNXCi3ysbY85r4 2xJ9tXKkGecPH5stBsiBP5K++uXbqgza6WBeUkymD2uLTprN5pAealPK/LN4vDaZ/PPj B5XlTFbH/5oJXxdGTSe4HwPTfz9bwDyUWKaNxHzpwtxMQknM87jC049KcAHEci9j/69d OIoJ8ptZkWsb+cp929sVPz3bPSrhTaEZz3FZO1CQhGco+g+j4dwnBZHFQeJQFVEuRAQr wmOO8UFQ4LHEtkgMjufub3vo9pv0uaCJ0wMI3END8XX32JL5sCHeI/pk4pIzivpescWC bEdA== 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-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=VZqxpmTLq7ANIHnvv08b9chlQb5uC3TxYbMtrp/5w/o=; b=iFDkSlSRX8b1pfKO9s+gnC/wreUI0OPRLWO2sNYXcOVWL2x+/DeerOGWFzPggrCJlx Qye6W9xEmbCg/4Vp/dOW02fpwwIG6uszHgE37A/4GxAksy+Gn9EbjY6geXwOKpMQ3m09 y4BIOwKCelPbbBxgGVlqCh92Rv1RiM8/nSG6H1SgvmuSY8B4vE9xxNd1CWNjLvlXWHDm x0R/E1m3jy7rdhbX6/dY5Jvb8IZkKfExJSnkCSwwC1NKY2DrkEYUryiSSWa3T/nin2Y5 Bf7klvZFAacSbnl6Qj8dMjggKLNlxNsJXLVofNLdXGXG8YVl5EzJ4k5QClos97A9ijMW nj8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=P7mC3YM7; 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 k8si11920426otp.69.2020.02.04.08.30.28; Tue, 04 Feb 2020 08:30:40 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=P7mC3YM7; 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 S1727345AbgBDQ3V (ORCPT + 99 others); Tue, 4 Feb 2020 11:29:21 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:38078 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727307AbgBDQ3U (ORCPT ); Tue, 4 Feb 2020 11:29:20 -0500 Received: by mail-qk1-f195.google.com with SMTP id 21so1431318qki.5; Tue, 04 Feb 2020 08:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VZqxpmTLq7ANIHnvv08b9chlQb5uC3TxYbMtrp/5w/o=; b=P7mC3YM7jj2f3uNL632XGxBaFJJoe0ox5kkHZscoXgKtvKasu0s6SLFHyY8s+P8fmY ipfpYQE4vICNNdNe31JjXaxmFzQrQGyy9Le9fpIsB4jI3doRTLqxhwBSjL4q55bslykQ Jb6rAYUbQ7+PNDdntPG6PsUh+qcIc0Czq825LlDuj6J8UnXcT1iqQ6T6NneFYiWduYvd UPGIGnbQbYhqMkzzqz3lltKABNKIN1Sa0Gijnbrh6+GOPf+65KqOqsoY3y6Iwy0AOl2o XKkvZ/Re1uk3p6T1qJ9LImqdjCW9iDKWjCajN54KxLqmIYnWVV6gN4inySNvW2BXXEuV L+HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=VZqxpmTLq7ANIHnvv08b9chlQb5uC3TxYbMtrp/5w/o=; b=rafAfEWcde6/YAv2m3PbTAaBhzCscYozFPYyiDWqq6CooqlMhed3EF2C4nl59V76fR 4JJGDmLBHzmY4UH00MNTspn5aBdbpSoTUI9dYqoPZe8yF28MWS5bfcFOlgItA8lBwV4S e8jR5aSjVu436EVATfaE1JLRPUO4WZCzaAP4GHkn6RykrEO4eHpZYLm+CtGUd+Cv8DaT mJzGGoe13fDulOhV67tYuIFUqUACW8jqOA2d4STPbtYlkCoC2Sb9TPqP/Waa439nEnQO uVJsLLf8DTSIM4VFm6KaKCfddHOR6BBwSSjfLJQkwZHosZjPidhMEP0qHHLADyA2lfha IKNA== X-Gm-Message-State: APjAAAUPx5nUgusikNNMrYKsRL1PgLp7XiEp5LsbB9lLi2sPiiXK+xwF zGix2NAXF1sF5CSXo+QjUDk= X-Received: by 2002:a05:620a:16a4:: with SMTP id s4mr28708125qkj.488.1580833759694; Tue, 04 Feb 2020 08:29:19 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id w134sm11606629qka.127.2020.02.04.08.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 08:29:19 -0800 (PST) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 4 Feb 2020 11:29:17 -0500 To: Masahiro Yamada Cc: Arvind Sankar , Linux Kbuild mailing list , Linus Torvalds , Geert Uytterhoeven , Linux Kernel Mailing List , Andrew Morton , Greg Thelen , Mauro Carvalho Chehab , Sam Ravnborg Subject: Re: [PATCH] initramfs: don't double-compress built-in initramfs if the kernel is compressed Message-ID: <20200204162917.GA1772390@rani.riverdale.lan> References: <20200203200656.GA455151@rani.riverdale.lan> <20200203211644.39847-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 04, 2020 at 11:22:19AM +0900, Masahiro Yamada wrote: > Hi. > > On Tue, Feb 4, 2020 at 6:16 AM Arvind Sankar wrote: > > > > If the kernel is going to be compressed anyway, there is no point in > > double-compressing the built-in initramfs. Hide the built-in initramfs > > compression choice in this case. > > > > Signed-off-by: Arvind Sankar > > > Double-compression slightly reduces the data size. > And, keeping the bare vmlinux small is beneficial, IMHO. > Ok. In my setup (kernel is compressed by xz), none for the builtin initramfs is optimal by a measurable amount, but I that will depend on config/initramfs contents/compression methods, so might well not be true in general. Maybe add a note to the help text? none 7030816 arch/x86/boot/bzImage gz 7382144 arch/x86/boot/bzImage bz2 7353696 arch/x86/boot/bzImage lzma 7118176 arch/x86/boot/bzImage xz 7126400 arch/x86/boot/bzImage lzo 7379360 arch/x86/boot/bzImage lz4 7335712 arch/x86/boot/bzImage diff --git a/usr/Kconfig b/usr/Kconfig index a6b68503d177..b68910b225fc 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -125,6 +125,12 @@ choice low on RAM, since it reduces the memory consumption during boot. + Note that if the kernel itself is compressed, the builtin initramfs + will be compressed twice, first by the algorithm selected here, and + then by the kernel compression method chosen. This may increase the + final image size, so you should test whether compressing the builtin + initramfs provides any savings. + Keep in mind that your build system needs to provide the appropriate compression tool to compress the generated initram cpio file for embedding.