Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp101537pxb; Wed, 24 Feb 2021 19:51:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7qDRWtvplnUuCVqSWRWQh2nX6FzmQZmcHbKfiKB8Su2RaOQcWbNgt868xBL6hCTF1dVHv X-Received: by 2002:a05:6402:26d5:: with SMTP id x21mr1009403edd.50.1614225071814; Wed, 24 Feb 2021 19:51:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614225071; cv=none; d=google.com; s=arc-20160816; b=W5ELfJrEpEn1oCS4Vp6spOD6ZqhspCnrEMzRlRAQjUQ1Y8al+Xql10jelcNe4Cv9Ud +ywD3a4BypRRfeQj426+dQpd/gylBnjGOwsJBCiit7c4rVFBBwu7ZDEK8YRBMhFj+ot1 hTaudqwjDXy5Qp4QOG+4Meb6NKWRlw6ZU+u0C3mNoH8o6VvtzKaOsf6QdI+SYtvCDgN/ PFAufV3PshtzfA9AOBifDlZUi+db50/UxlJ5rTbAh1/7NbcssiKLZCjbLzWSA0qM1KHj uIlHIrJ0bltdy8BPIz0AU4hc+D2tAluJEkaIRLpH1MXk+jDUSGqxRpfcrAlka1iIxYCS a7YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=UApUAr5aUTGGANGV03dJ/EdX6/gNj/uFRxv6Z3ZwiG0=; b=yORg4GYLcwYkOKNAAzFt0xtHA3QERRlT/2HhDhhB2IFDJXhCCegU49QnGSYFWywH19 h8poDsJlHvVdr5be1735idzmmWF4z4Bp3eOVEVWEKrvpuiXqT4PQ2ud8vcWyESMEIHMH pxGaG6GGpAxpeSBQI9B0cXL9wJEYbKQxb21/3yOMoRGDfBG7hjT3d/oMacZkhCIqAtxM JtITp7WHHsbaJ5maKm3hccZGBTQ/22oU7qyRa5e/vyPavIQMzBaaxPzCubgvruH2sa6i y/7ZKaN/RcCPYZsVvrBI2zRRnafsfmgzRMbGR05sISkqrpe3IncpOtAQEDknEUFZmSPG NQIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=G6HRa4tF; 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 hr33si2750189ejc.653.2021.02.24.19.50.48; Wed, 24 Feb 2021 19:51:11 -0800 (PST) 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; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=G6HRa4tF; 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 S232746AbhBXWNt (ORCPT + 99 others); Wed, 24 Feb 2021 17:13:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhBXWNq (ORCPT ); Wed, 24 Feb 2021 17:13:46 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A05AFC06174A for ; Wed, 24 Feb 2021 14:13:05 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id v22so4436796edx.13 for ; Wed, 24 Feb 2021 14:13:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UApUAr5aUTGGANGV03dJ/EdX6/gNj/uFRxv6Z3ZwiG0=; b=G6HRa4tFcZ0icwERNU3bqShT2VGAE/aZGrPJoUnJL5qp74veH/6YOuZuvIKcykMntc JnmPUMoTcSxU/MmG51Xe8HDAO8lJNMd91/F+awStb+fncySkfGCR2mwee5a1i3tVX4bI y76QGMcKJHpiYN+N/Gg8UnLbdqNurSaNJxaeA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UApUAr5aUTGGANGV03dJ/EdX6/gNj/uFRxv6Z3ZwiG0=; b=Gv+uQj4YELuvL1z/hXTNbzGJ8tyfX9M5VWsl91fKgRSla9DzDHiGNa3SWQCnG7HAlo 3ylqTlF5Ussrph0cqEZKBObDWdYTchnQRigFAngDn5uWNM6xRvZBQpv3A46jRZJJACAa oBJKOroMk1SI7Cnt93mwYWI6AbP6v4JHDCp4zbH56CyvFruUhjozLOmPo+l3kcSFlTVI nad0M84s6uI2ngu/gB7266BTk4ZVkucEyP5Ab8sus13BixovAwuAY/ZFXoX6NsbprIWj STRJUz/Jub3jEN3JWrTDRqXTirlvXjl3uUIo3uU+lF6T645tunAALt5Ib99DVjg9Kttj XtZQ== X-Gm-Message-State: AOAM531R+iqZjq2QKttY8Qag9GiMC3kN9YjY5MSv7Ybi1817VKMCFBp/ 7P1sfnuIOppbVIYkbGo474cg8w== X-Received: by 2002:a05:6402:1151:: with SMTP id g17mr35223342edw.48.1614204783891; Wed, 24 Feb 2021 14:13:03 -0800 (PST) Received: from [192.168.1.149] ([80.208.71.141]) by smtp.gmail.com with ESMTPSA id lu26sm404186ejb.33.2021.02.24.14.13.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Feb 2021 14:13:03 -0800 (PST) Subject: Re: [PATCH/RFC 1/2] init/initramfs.c: allow asynchronous unpacking To: Linus Torvalds Cc: Linux Kernel Mailing List , Luis Chamberlain , Greg Kroah-Hartman , Jonathan Corbet , "open list:DOCUMENTATION" , Nick Desaulniers , Peter Zijlstra References: <20210224142909.2092914-1-linux@rasmusvillemoes.dk> <20210224142909.2092914-2-linux@rasmusvillemoes.dk> From: Rasmus Villemoes Message-ID: <8ccfae21-c72a-f00e-8ec1-56ed809e3295@rasmusvillemoes.dk> Date: Wed, 24 Feb 2021 23:13:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/02/2021 18.17, Linus Torvalds wrote: > On Wed, Feb 24, 2021 at 6:29 AM Rasmus Villemoes > wrote: >> >> So add an initramfs_async= kernel parameter, allowing the main init >> process to proceed to handling device_initcall()s without waiting for >> populate_rootfs() to finish. > > Hmm. This is why we have the whole "async_schedule()" thing (mostly > used for things like disk spin-up etc). Is there some reason you > didn't use that infrastructure? Mostly because I completely forgot it existed, it's not an API you stumble upon in every other source file. I guess I could use that, but it would look very much like what I have now - there'd still be some function to call to make sure the initramfs is ready, only that would then do async_synchronize() instead of wait_for_completion(). Is there some fundamental reason something like this shouldn't be doable? Are there places other than the usermodehelper and firmware loading (and obviously right-before-opening /dev/console and exec'ing /init) that would need to be taught about this? Rasmus