Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3202513ybh; Mon, 16 Mar 2020 18:08:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt9M80ZAwlMHBvw1kQOsTyumyPhXIClNmFZMd3eFyJ3Zng773F8HCdLfQhYbmj3JmxNq+lg X-Received: by 2002:a9d:b8f:: with SMTP id 15mr1682605oth.256.1584407279866; Mon, 16 Mar 2020 18:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584407279; cv=none; d=google.com; s=arc-20160816; b=bAbm1081uXyW5J0fvsc8ChE6LGQYYWBcKavQPPdawzpzpxuugjxaDxayMyz37wwBF7 7ADiNfIvKRbACI9q7Ku0NqgJB2ByZAFUntntFBykdDkP6yzNSUWCKGyCBBKwuvhwRkd8 Dly5bMHp4y5us8RUHIBCxU21Qpwy7BGjS+SwDBhVhD3dmBGU9PImWM3xR7efybYRcGMp Kia1Dk/zoXswt9U36M1OHqu85Uvx/sy4JoVk1uKvChMJc70VwDWXaamt6LYp5LqP3sCO XEWtGq7omScoV2ZyPUlSHjnadKzb6SfE7WbwM6mZOOkqCLvhtkpwT10rmayofq4DGwrp Z78Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=bTisUi+CZu/g6bO8aAotHn/SP8Hi7R+MiDzAL3ZUAfI=; b=Uo4V/qjud4s4DhbyJvhj8nsX192gR+AR/4R1OCD3qc2abNTkdoycqgN4dfkX3kZIXX 90yUcPSIRnS2U6qnSupCrc7j29HBGJv+A1DV2YmaXnkrLpuNhJcVnnSzYHn1zNvH2I+P CoKS7A43GF5+GUxFv/GvAQyYwxWrk9qZfuQzXVRdXTye5qO37c2BE2DxXFu+JCMJXGjw unEfawP8zVKw8G/GWD/cOF9v9LUYt1gfR4+Du/XEp7eT11Cbca1GY/Z1Q/ilNypNz7zC /a6MXn3OlIhOzv8pISEsVJNNp1NvaDZ23RBUD14adD08CPfDdP/+EAsIHNng74yBR5eY /YEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ji2It9v1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v130si866725oib.115.2020.03.16.18.07.47; Mon, 16 Mar 2020 18:07:59 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ji2It9v1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733198AbgCQAwW (ORCPT + 99 others); Mon, 16 Mar 2020 20:52:22 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:49313 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733122AbgCQAwV (ORCPT ); Mon, 16 Mar 2020 20:52:21 -0400 Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 02H0qATW015723 for ; Tue, 17 Mar 2020 09:52:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 02H0qATW015723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1584406331; bh=bTisUi+CZu/g6bO8aAotHn/SP8Hi7R+MiDzAL3ZUAfI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ji2It9v1H6SycySh6Tfb8fZBnkrKpkX6+Aqs5NFA/+Y5ti2Azoy6+wuAhqJdEUfeJ e439Ti3fs0IUKDa2rcJHn8FrKT93uNvDXtf7W1SRwPa5tCKLwsZAgN3FX+6YFXkP1z rWJXKKJA2VUE65KMiz48ZUaU/N5fRgIxZFgodYraFfknGKre8+qnzRQ74VRpOA3/4V Ui9+XXWyENLpz4CzMw8fxuC9/qZP0lJNe9ESVpInJCvjM8YDLQtNgRm2sRA/VQdv6a ytyLh+B2mIpmAPpTKTm+Q9sNOzVIDGGqigEpJRDw7kuqFP8tV8ZBtHxJqLRZlMhIp5 VRyTCPiIaxrvg== X-Nifty-SrcIP: [209.85.217.52] Received: by mail-vs1-f52.google.com with SMTP id m25so3904043vsa.7 for ; Mon, 16 Mar 2020 17:52:10 -0700 (PDT) X-Gm-Message-State: ANhLgQ39JH2J2E4B70gHSzSgO97btuRfn3AK6pUp1FCzsmsqzIQI8NBK lzTfYEFZBQa6vUmZ8bXnwGktZKcfj1IYK4rZvBw= X-Received: by 2002:a67:8745:: with SMTP id j66mr1824203vsd.181.1584406329863; Mon, 16 Mar 2020 17:52:09 -0700 (PDT) MIME-Version: 1.0 References: <20200316112519.4375-1-Eugeniy.Paltsev@synopsys.com> In-Reply-To: <20200316112519.4375-1-Eugeniy.Paltsev@synopsys.com> From: Masahiro Yamada Date: Tue, 17 Mar 2020 09:51:34 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] initramfs: restore default compression behavior To: Eugeniy Paltsev Cc: Linux Kernel Mailing List , arcml , Vineet Gupta , Alexey Brodkin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 16, 2020 at 8:25 PM Eugeniy Paltsev wrote: > > Even though INITRAMFS_SOURCE kconfig option isn't set in most of > defconfigs it is used (set) extensively by various build systems. > Commit f26661e12765 ("initramfs: make initramfs compression choice > non-optional") has changed default compression mode. Previously we > compress initramfs using available compression algorithm. Now > we don't use any compression at all by default. > It significantly increases the image size in case of build system > chooses embedded initramfs. Initially I faced with this issue while > using buildroot. > > As of today it's not possible to set preferred compression mode > in target defconfig as this option depends on INITRAMFS_SOURCE > being set. Modification of all build systems either doesn't look > like good option. > > Let's instead rewrite initramfs compression mode choices list > the way that "INITRAMFS_COMPRESSION_NONE" will be the last option > in the list. In that case it will be chosen only if all other > options (which implements any compression) are not available. > > Signed-off-by: Eugeniy Paltsev Applied to linux-kbuild. Thanks. > --- > usr/Kconfig | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/usr/Kconfig b/usr/Kconfig > index bdf5bbd40727..96afb03b65f9 100644 > --- a/usr/Kconfig > +++ b/usr/Kconfig > @@ -124,17 +124,6 @@ choice > > If in doubt, select 'None' > > -config INITRAMFS_COMPRESSION_NONE > - bool "None" > - help > - Do not compress the built-in initramfs at all. This may sound wasteful > - in space, but, you should be aware that the built-in initramfs will be > - compressed at a later stage anyways along with the rest of the kernel, > - 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 > - > config INITRAMFS_COMPRESSION_GZIP > bool "Gzip" > depends on RD_GZIP > @@ -207,4 +196,15 @@ config INITRAMFS_COMPRESSION_LZ4 > If you choose this, keep in mind that most distros don't provide lz4 > by default which could cause a build failure. > > +config INITRAMFS_COMPRESSION_NONE > + bool "None" > + help > + Do not compress the built-in initramfs at all. This may sound wasteful > + in space, but, you should be aware that the built-in initramfs will be > + compressed at a later stage anyways along with the rest of the kernel, > + 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 > + > endchoice > -- > 2.21.1 > -- Best Regards Masahiro Yamada