Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp89586pxa; Mon, 3 Aug 2020 23:53:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOH7nIIocVHfLisgtYuBvt3Qf8zfRjJXnIT/oTpLxED+0ei6+usuJcoA4ILU5AdrWbKIqw X-Received: by 2002:a17:906:da19:: with SMTP id fi25mr19471138ejb.405.1596524029158; Mon, 03 Aug 2020 23:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596524029; cv=none; d=google.com; s=arc-20160816; b=dT28WiZBl0XUR11lCVUa7TzcsLoqlG559qkIF/9bQtxJ4rgaesK0WH+/faiq0u/eM1 Db0AYg7LyaZwnpWXXCsl+rFtf3wcWhhAzzXJs5/R4zyhdGfbyR4ryU/zwTm6qKzz0pIi 4CZSbFITuCxpaOKvAUpzQnJ1p+Sv/Wiqiorv06PNGYF+kOnmu8kXEN6oPR04q1djosq8 ftnKqInP6Eey+WKSLLDlwcwhi6yBQh2JfW6IJFpN9f316kviSgEUiVZ0uja3nyxD/Qyg AQ1C1QrrT2S8GiV6l1lJE7mkqLeX1h9u/cz8TNLtbipsaCGu/r/RAmE/T5c4nXXcQa7T ciLQ== 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; bh=YjoIFzh9jDU8UWoCt7/Wn0DBpRmUwyFzM9/YPPK7imw=; b=IueDXKo0CqwrMJ3QGmrmXav5zaqiaWHpMcbPGqogT932NrCCMBASbao9E4SkQIyQ8c Ent2gRMoPiTp6JjtKjbM+TyFQAjZc0gLI2mXYHdXN6YRZLvV2K820dQVHa4VFtMWlyRr riioO/zkOYCdsTTJ36Vx918iOxGlaEuQuBgHc6TQ/kiY0pRQxORnQmIc5XNjqKDQsfEb F2DwqcCpTaXiXux9FcXp/R2n2qO/P0hIbOFNbAiM4GUNN8Vj9hq9gQtCBsxSe5anQwDz o3ghlT18XSJtPl64phbpH2MjPlGz7vsSd7OBPg0XXm/HTnQw38b5blST48m9VNhnDrre U7Ng== 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 gw21si10495068ejb.656.2020.08.03.23.53.27; Mon, 03 Aug 2020 23:53:49 -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 S1726656AbgHDGwv (ORCPT + 99 others); Tue, 4 Aug 2020 02:52:51 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:40070 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHDGwv (ORCPT ); Tue, 4 Aug 2020 02:52:51 -0400 Received: by mail-oi1-f194.google.com with SMTP id u24so25599100oiv.7; Mon, 03 Aug 2020 23:52:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YjoIFzh9jDU8UWoCt7/Wn0DBpRmUwyFzM9/YPPK7imw=; b=STgyjJJVqnqx3ixwHe52rNq4BumDhAjgmSgLW/O52KUqRvRoDpSSIgtMU+dN+mIYYw e6lmneuTy0w3cSPwpZNye18su3IaXFTiZ7+sGpHoEdiXHOmF/3Invd46j82Jwm8VGcJ3 emTAAA2eSmyCmb3SPtVvEfAvRC/zdiknjXZLHRyeIJdlOrhJLm9LGeH/Tkf1Kd9kT0bw YylSbW1MGqVJO142Wk7a4jAQrGdKs/3jQzp+YJ8CLSB05Ph7IesuC4NtrwwjsyinGOhy Nq/rPD2Ky7+ubRfo6h211NNnjeOCMq+Lf9a+mdBX6AoyUC/geaF2H98C+TehRtdOVpuW 7P6w== X-Gm-Message-State: AOAM532j2pTBQXrAcPK77+Wd+x14mnAsqbmB6j41mpKlqUm9wnh2WjGI TN5HC7O2bKrHn/yFnk9aD4/qwnXq1t3uRzIuGTA= X-Received: by 2002:aca:adc4:: with SMTP id w187mr2146263oie.153.1596523970050; Mon, 03 Aug 2020 23:52:50 -0700 (PDT) MIME-Version: 1.0 References: <20200730190841.2071656-1-nickrterrell@gmail.com> <20200730190841.2071656-5-nickrterrell@gmail.com> In-Reply-To: <20200730190841.2071656-5-nickrterrell@gmail.com> From: Geert Uytterhoeven Date: Tue, 4 Aug 2020 08:52:38 +0200 Message-ID: Subject: Re: [PATCH v10 4/8] usr: add support for zstd compressed initramfs To: Nick Terrell Cc: Borislav Petkov , Thomas Gleixner , Linux Kernel Mailing List , Chris Mason , linux-kbuild , "the arch/x86 maintainers" , Greg KH , Petr Malat , Kees Cook , Kernel Team , Adam Borowski , Patrick Williams , rmikey@fb.com, Ingo Molnar , Patrick Williams , Sedat Dilek , Norbert Lange , Andrew Morton , Alex Xu , Masahiro Yamada , Nick Terrell 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 Hi Nick, On Thu, Jul 30, 2020 at 9:13 PM Nick Terrell wrote: > From: Nick Terrell > > * Add support for a zstd compressed initramfs. > * Add compression for compressing built-in initramfs with zstd. > > I have tested this patch by boot testing with buildroot and QEMU. > Specifically, I booted the kernel with both a zstd and gzip compressed > initramfs, both built into the kernel and separate. I ensured that the > correct compression algorithm was used. I tested on arm, aarch64, i386, > and x86_64. > > This patch has been tested in production on aarch64 and x86_64 devices. > > Additionally, I have performance measurements from internal use in > production. On an aarch64 device we saw 19 second boot time improvement > from switching from lzma to zstd (27 seconds to 8 seconds). On an x86_64 > device we saw a 9 second boot time reduction from switching from xz to > zstd. > > Reviewed-by: Kees Cook > Tested-by: Sedat Dilek > Signed-off-by: Nick Terrell Thanks for your patch, which is now commit a30d8a39f0571425 ("usr: Add support for zstd compressed initramfs"). > --- a/usr/Kconfig > +++ b/usr/Kconfig > @@ -100,6 +100,15 @@ config RD_LZ4 > Support loading of a LZ4 encoded initial ramdisk or cpio buffer > If unsure, say N. > > +config RD_ZSTD > + bool "Support initial ramdisk/ramfs compressed using ZSTD" > + default y > + depends on BLK_DEV_INITRD > + select DECOMPRESS_ZSTD > + help > + Support loading of a ZSTD encoded initial ramdisk or cpio buffer. > + If unsure, say N. I'm aware you copied this from the other entries, but IMHO "default y", and "If unsure, say N" are not a good combination. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds