Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3820875pxf; Mon, 15 Mar 2021 21:09:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2TCTEs2Au9qma/G3+MEIlHZRo9dVgx72ouvkfl+oJwqpavw6I0Y2rj9lmiKadokeAHX23 X-Received: by 2002:a17:906:25c4:: with SMTP id n4mr27603137ejb.359.1615867747070; Mon, 15 Mar 2021 21:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615867747; cv=none; d=google.com; s=arc-20160816; b=AMZ+Vx+4KF7HojsTcBrYzgEnzF/kQ8JTPgpvgFIuMI4KD+3lBweEECXXXDO/TyKY3v f8aymqs2o/rH6qv9k8SFHj2NQZapvy3yfOr9VVHFMFUb26OZ1K5DH1pi3oOB6pLogEZD +yOiSOmVJ4p5gJnnpFp1Sx3jxFPFL3sOHyjU0B21aE1GCQArymC5HIQXmUFodVZP2+sm TvgS9iLtF5lw6FmR5cwLlSqBS2tTe7F/fgamNIIl/Mnfsjm9BpnKJpB2jv6lRvOFIUt6 m4Di/jecC+QPUkYsG5FabDb8bTLMD5b5SvYI5ttZJn1N+j/C8V3RoBSgACjxU8awO6C5 omeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OOVcujQsXQLxPa5Y1WXIcDvGuW02nNmnNAEglQlFDyU=; b=ktDjTiSEWVFG9qi7Gbro5fwiGwjOhoAOF+fLoous0NuqP+8gcSFnfuEqrXLPIerjYK e43Fled2ZQB0iclHlwHWEuJQL7ekUpoGC2YpBcg0K8qjnBsMB+4a2HGZQqAeI81jgiAr Ld9w0QDidEVibF4bwb204Irjvf6DfarvMLlvN4HvMABXgHtl87IOiNgq573JJ3CwhuCv jU49dukeFrXBySxXZBUGAY3zjiHBYkYCrO66BPYYz6vN8TFazCKVM9ldiXAPje4sm+QG 2aZ31mOpu+0rAGc5em65Zb4p6v5xfSwIJXEak8+vjjQeqF9JW8Q1AZD199pcAGBJLgjW 21MA== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss21si12643659ejb.338.2021.03.15.21.08.44; Mon, 15 Mar 2021 21:09:07 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234073AbhCOUHW (ORCPT + 99 others); Mon, 15 Mar 2021 16:07:22 -0400 Received: from mail-pg1-f178.google.com ([209.85.215.178]:34067 "EHLO mail-pg1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbhCOUG6 (ORCPT ); Mon, 15 Mar 2021 16:06:58 -0400 Received: by mail-pg1-f178.google.com with SMTP id l2so21128640pgb.1 for ; Mon, 15 Mar 2021 13:06:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OOVcujQsXQLxPa5Y1WXIcDvGuW02nNmnNAEglQlFDyU=; b=SBALJyM8aFf4OzjMTlo/EHscjRC/91xoHznnodJtx4eIk2i+73V250Z492m5geCb9b XJOwZbHiCVH2FATuY5EMjpWTwfTkT5GmzEQqnKTQjbimaIwsL8T5T5bC2IByR/3EeIDz zTk/bDP9mlgbh+WJ9pKkUk2Ttz8qOXvB9XvFvIBod2p2bM5VRPRVTt73KbrD5kM1v/gL m2XHpn+Eny7M1CrWoma51k8bLuAl4diwVGxjyu/hN5Nw9CoQGfqMfFmFME7SUOmToBUi Vib4lcZEvJ/DKTGTbAniKIvKCtdgpUrNTXPbaboFPIWtRmDVRp6bOtIdL2xvjgMWvkVt penA== X-Gm-Message-State: AOAM532rJKYGqvymzshJ1Q980s9xqnK8+QGB0Dcp4Sbf7uR1z9KWF6H+ f9IDqm7Sb8sObsJSFkpD6/I= X-Received: by 2002:a62:92cc:0:b029:1fa:515d:808f with SMTP id o195-20020a6292cc0000b02901fa515d808fmr25548284pfd.43.1615838817895; Mon, 15 Mar 2021 13:06:57 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id ge16sm450600pjb.43.2021.03.15.13.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 13:06:56 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 905FC40106; Mon, 15 Mar 2021 20:06:55 +0000 (UTC) Date: Mon, 15 Mar 2021 20:06:55 +0000 From: Luis Chamberlain To: Rasmus Villemoes Cc: Linus Torvalds , Andrew Morton , Jessica Yu , Borislav Petkov , Jonathan Corbet , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Nick Desaulniers Subject: Re: [PATCH v3 2/2] modules: add CONFIG_MODPROBE_PATH Message-ID: <20210315200655.GX4332@42.do-not-panic.com> References: <20210313212528.2956377-1-linux@rasmusvillemoes.dk> <20210313212528.2956377-3-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210313212528.2956377-3-linux@rasmusvillemoes.dk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 13, 2021 at 10:25:28PM +0100, Rasmus Villemoes wrote: > Allow the developer to specifiy the initial value of the > modprobe_path[] string. This can be used to set it to the empty string > initially, thus effectively disabling request_module() during early > boot until userspace writes a new value via the > /proc/sys/kernel/modprobe interface. [1] > > When building a custom kernel (often for an embedded target), it's > normal to build everything into the kernel that is needed for booting, > and indeed the initramfs often contains no modules at all, so every > such request_module() done before userspace init has mounted the real > rootfs is a waste of time. > > This is particularly useful when combined with the previous patch, > which made the initramfs unpacking asynchronous - for that to work, it > had to make any usermodehelper call wait for the unpacking to finish > before attempting to invoke the userspace helper. By eliminating all > such (known-to-be-futile) calls of usermodehelper, the initramfs > unpacking and the {device,late}_initcalls can proceed in parallel for > much longer. > > For a relatively slow ppc board I'm working on, the two patches > combined lead to 0.2s faster boot - but more importantly, the fact > that the initramfs unpacking proceeds completely in the background > while devices get probed means I get to handle the gpio watchdog in > time without getting reset. > > [1] __request_module() already has an early -ENOENT return when > modprobe_path is the empty string. > > Reviewed-by: Greg Kroah-Hartman > Acked-by: Jessica Yu > Signed-off-by: Rasmus Villemoes Acked-by: Luis Chamberlain Luis