From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BF66C433DF for ; Tue, 4 Aug 2020 07:25:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A19332076C for ; Tue, 4 Aug 2020 07:25:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="P+oC1ONX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729891AbgHDHZg (ORCPT ); Tue, 4 Aug 2020 03:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbgHDHZf (ORCPT ); Tue, 4 Aug 2020 03:25:35 -0400 Received: from mail-oo1-xc41.google.com (mail-oo1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40B14C06174A; Tue, 4 Aug 2020 00:25:35 -0700 (PDT) Received: by mail-oo1-xc41.google.com with SMTP id z11so1020042oon.5; Tue, 04 Aug 2020 00:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=3G6duaqKS+iqVSYEuxdfn+liPqqsSiNQMWQkrp/rtcA=; b=P+oC1ONX4KhsZvaMwr9JFGsSROK1t2WF8nWhL5Hb8WlbFKQcfjnffuj5cHtyDXhTQe RtZ2sbTg4+PrRlYLSiyDjOOOnYVQbPjoeqHiOnUxGAs/YqTy1MkqtHmAeXR537w3YEbf BhQ+AeypP5X7Qz2CxJPJ/VX/W8AYeiTh6dyQTbQRnC6MgKKSPMS1yzts1edOkNPNcsls BAeHs8BqCJsk0tMUbC525jtBsTJNnhrPSEfmKInyz42f2CGeNyYv/LoW9Df+k1R/3HEq PWtqACBeJGC1XbRWBkibV9geaauVi1aWrie/ld1nlJa4l3F3rN+y3HuDVw93r7k6LUTs j72Q== 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:reply-to :from:date:message-id:subject:to:cc; bh=3G6duaqKS+iqVSYEuxdfn+liPqqsSiNQMWQkrp/rtcA=; b=k4ge71sBwNIZk6XAj4E7AGQStzc7S6aPI7xWbc9Td52HnE0t74pRCksaOojj7ZI2wq aqvpyuFXkmvtxiSHjp8vaLCY4FNhbp+7n4JLMiUxCIuv3RB+ea92R0FMMx9y8zRRkPpi TtvM9QAG/7lg7cAhZTyYYZKpVsjHCaljc+E/PhM4Fhil5GWtU1lYcWbofZCoIiBKjlK6 eTDBJ8BgUTU2vS89IRbpos5FCtwC8rFR9H2SZ2pQ7vI7kzbDlFcem4csqrF5xuiJlGXR mf9RUKJMB8GzfaqYC1rKGY8xgIweBmqqmA7HytiMRGV3HeBCiGTqWcuBub075UulDnrh rpWg== X-Gm-Message-State: AOAM530+U24lF/1Um5XmkLSX9KdOGoqgvx3jfQy45k4sDMRro0Sul0CI fXdZ2cGWp3suGgUWuHkcD6EqSlTgwfpu3iLFOkI= X-Google-Smtp-Source: ABdhPJxRuEKIkrFsD8hgOom6KFNXxJ1GrBXHYx0gjfD8gbX84cPUXN3kfUBPjtHwww2sbHWbMVw7OYS2H0mw+tE+r/w= X-Received: by 2002:a4a:dfd4:: with SMTP id p20mr7546616ood.86.1596525934626; Tue, 04 Aug 2020 00:25:34 -0700 (PDT) MIME-Version: 1.0 References: <20200730190841.2071656-1-nickrterrell@gmail.com> <20200730190841.2071656-5-nickrterrell@gmail.com> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 4 Aug 2020 09:25:23 +0200 Message-ID: Subject: Re: [PATCH v10 4/8] usr: add support for zstd compressed initramfs To: Geert Uytterhoeven Cc: Nick Terrell , 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 , 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 On Tue, Aug 4, 2020 at 8:52 AM Geert Uytterhoeven wrote: > > 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. > Hi Geert, you are right - for new stuff it should be "default n". What I am missing - still - is a note - that your user-space should have the correct bits to support zstd-initramfs. Unsure where to place such an information. If you send a patch for above feel free to add my: Reviewed-by: Sedat Dilek Thanks. Regards, - Sedat - [1] https://bugs.debian.org/955469 > 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