From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91958136357; Tue, 17 Sep 2024 09:03:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726563801; cv=none; b=kvVwFcK6A0uh0L60NMVPPYtDSn2dO1/BTFMQ3QTZglVhX2Z0+AJs6qJtWxYtZHTnCMO8jHP7/ZEtNJKPK8R07Fmr8fAzqYTNks8/Mf0xYZydL+ORO/daBZ1ae9ZMaIWgzoG6z7cfZX7qcVMGU+Ikl1fvobSaVE+dzZ9tllMGXlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726563801; c=relaxed/simple; bh=OsFdptcZeF3SkvKh3KbXZC51VYL7O10KmMpKSiV9EgE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dPM2p++KE7NsuxSazXrtuO2rmjQ+MVhb2uzIIk8CuvXMMaqjdLNtWttFp8i9gn87xJ/OOwfDkMrXRBoEwqGq4NaIC1Ah7F42czrCJ4fxUzqC6S2OJb5xuFWTvhYKyVZ+bU8RWH0RA8v7zekuFzJgFU2z69OY0YWlE9TjMFOhTYg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fDL01/k7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fDL01/k7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FB4DC4CEC6; Tue, 17 Sep 2024 09:03:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726563801; bh=OsFdptcZeF3SkvKh3KbXZC51VYL7O10KmMpKSiV9EgE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fDL01/k735mRABQsLa5JjfYg42kh4IIOz9YBzhl0cIPUqscQXIXtuWWNgEI3auO+A v4/BR1LGT43a/giVYohTuuDA24hjNqKuNIoOtOJpPFCgM/igLscryEZ5MPWnPpdW/T SGLeLjCxfP0NrPftCE2cIptotuAwsNVWRNs/6b0x/U1p8gcM/Cnp0XMe1g22UIJWyy 2ie4zsWzLObN25DtOQH5c8WzwKMUWWZj5l9qzN+gK9F2v9d8DbC4s0Zg71R/ZKAh17 vSWhVdSYDeSpvXso45hIZnZD+8rTpliz9lbiCNFTYI+IYOPMJcU+GpeGaZk4mh3LJd ltBrlnuLbwSlQ== Message-ID: <26fed82b-7c60-4fda-8951-b22654728743@kernel.org> Date: Tue, 17 Sep 2024 11:03:14 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/2] Add framework for user controlled driver probes To: Nayeemahmed Badebade , Greg KH Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, rafael@kernel.org, yoshihiro.toyama@sony.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20240911142319.3435746-1-nayeemahmed.badebade@sony.com> <2024091327-repacking-avatar-ec23@gregkh> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssm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FAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 17/09/2024 11:06, Nayeemahmed Badebade wrote: > Hi Greg, > > Thank you for taking the time to check our patch and provide > valuable feedback. We appreciate your comments/suggestions. > > Please find our reply to your comments. > > On Fri, Sep 13, 2024 at 06:36:38AM +0200, Greg KH wrote: >> On Wed, Sep 11, 2024 at 07:53:17PM +0530, Nayeemahmed Badebade wrote: >>> Hi, >> >> If Rob hadn't responded, I wouldn't have noticed these as they ended up >> in spam for some reason. You might want to check your email settings... >> > > I have ensured standard settings which we have been using are used this > time, let me know if this email is received properly. > >>> This patch series introduces a new framework in the form of a driver >>> probe-control, aimed at addressing the need for deferring the probes >>> from built-in drivers in kernels where modules are not used. >> >> Wait, why? >> > > We have a scenario where a driver cannot be built as a module and ends up > as a built-in driver. We don't want to probe this driver during boot as its Fix this instead. > not required at the time of booting. > Example: drivers/pci/controller/dwc/pci-imx6.c > So the intention is to only postpone some driver probes similar to: > https://elinux.org/Deferred_Initcalls > But instead of delaying initcall execution(which requires initmem to be kept > and not freed during boot) we are trying to delay driver probes as this is > much simpler. > The proposed driver is a generic solution for managing such driver > probes. > >>> In such scenario, delaying the initialization of certain devices such >>> as pcie based devices not needed during boot and giving user the control >>> on probing these devices post boot, can help reduce overall boot time. >>> This is achieved without modifying the driver code, simply by configuring >>> the platform device tree. >> >> PCI devices should not be on the platform device tree. >> > > You are right, we are referring to the pci host controller that will be > listed in device tree and skipping its probe during boot as an example > here. > >> And what's wrong with async probing? That was written for this very >> issue. >> > > We have explored async probe as an option, but we noticed below: > 1) Probe initiated via async > 2) Boot continues with other setup. > 3) Boot reaches stage where ip configuration is to be done via > ip_auto_config() and 1) is still in progress, then boot waits for all > async calls to be completed before proceeding with network setup. > ip_auto_config() > -> wait_for_devices() > -> wait_for_device_probe() > -> async_synchronize_full() > 4) Similar thing happens with rootfs mount step in prepare_namespace() > initcall > > So to avoid getting blocked on these probes which are not required > during boot, we proposed this driver for managing such built-in driver > probes execution. > >>> This patch series includes 2 patches: >>> >>> 1) dt-binding document for the probe-control driver >>> This document explains how device tree of a platform can be configured >>> to use probe-control devices for deferring the probes of certain >>> devices. >> >> But what does that have to do with PCI devices? > > As explained before, the driver is generic one and is for managing probes of > drivers that are built-in. > > To delay such probes, in DT we add dummy devices managed by the proposed > driver. These dummy devices(probe control devices) will be setup as > supplier to the device nodes that we want to probe later. You embedded OS policy into DT. That's not really the way to go. Look how boot phase does it. First of all - it already solves your problem. Second - it's property of each device, not some fake provider. > dt-binding doc patch explains this process with pci controller node as > an example that needs to be probed later after the boot. > >> Best regards, Krzysztof