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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 4829DC47082 for ; Wed, 26 May 2021 22:33:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27032613DA for ; Wed, 26 May 2021 22:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234546AbhEZWfO (ORCPT ); Wed, 26 May 2021 18:35:14 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44085 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234535AbhEZWfN (ORCPT ); Wed, 26 May 2021 18:35:13 -0400 Received: (Authenticated sender: josh@joshtriplett.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 5D2EDFF806; Wed, 26 May 2021 22:33:26 +0000 (UTC) Date: Wed, 26 May 2021 15:33:25 -0700 From: Josh Triplett To: Menglong Dong Cc: "Eric W. Biederman" , Luis Chamberlain , Alexander Viro , Kees Cook , Sami Tolvanen , ojeda@kernel.org, johan@kernel.org, Bjorn Helgaas , masahiroy@kernel.org, Menglong Dong , joe@perches.com, Jens Axboe , hare@suse.de, Jan Kara , tj@kernel.org, gregkh@linuxfoundation.org, song@kernel.org, NeilBrown , Andrew Morton , f.fainelli@gmail.com, arnd@arndb.de, Rasmus Villemoes , wangkefeng.wang@huawei.com, Barret Rhoden , mhiramat@kernel.org, Steven Rostedt , vbabka@suse.cz, Alexander Potapenko , pmladek@suse.com, Chris Down , jojing64@gmail.com, terrelln@fb.com, geert@linux-m68k.org, mingo@kernel.org, linux-fsdevel@vger.kernel.org, LKML , jeyu@kernel.org Subject: Re: [PATCH v2 2/3] init/do_cmounts.c: introduce 'user_root' for initramfs Message-ID: References: <20210525141524.3995-1-dong.menglong@zte.com.cn> <20210525141524.3995-3-dong.menglong@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, May 26, 2021 at 04:33:00PM +0800, Menglong Dong wrote: > On Wed, May 26, 2021 at 12:33 PM Josh Triplett wrote: > > > > On Tue, May 25, 2021 at 10:23:09PM -0500, Eric W. Biederman wrote: > > > If we are going to do this something that is so small and clean it can > > > be done unconditionally always. > > [...] > > > The net request as I understand it: Make the filesystem the initramfs > > > lives in be an ordinary filesystem so it can just be used as the systems > > > primary filesystem. > > > > Including the ability to pivot_root it away, which seems like the main > > sticking point. > > > > If this can be done without any overhead, that seems fine, but if this > > involves mounting an extra filesystem, that may add an appreciable > > amount of boot time for systems trying to boot in milliseconds. (Such > > systems would not use an initramfs if they're going to go on and boot a > > separate root filesystem, but they can use an initramfs as their *only* > > filesystem.) > > Compared to the time the unpacking spent, a mounting seems nothing. In the > scene above, this change can be disabled by kconfig, if pivot_root > is not needed in initramfs. The initramfs could be as small as one file.