Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3290698iob; Mon, 16 May 2022 18:19:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC0tyW3z/OFn49Q5etmVa28lUxiGtBb/kaLDlrUGmpyzLzSSByr2pvqOrb+/favpzo7MQB X-Received: by 2002:a17:906:b50:b0:6f3:ce99:3c39 with SMTP id v16-20020a1709060b5000b006f3ce993c39mr17254876ejg.52.1652750340769; Mon, 16 May 2022 18:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652750340; cv=none; d=google.com; s=arc-20160816; b=P7zBC4eY7eAaRjy+5R0RtdI3EjqzjDdZBC3aD+WIwGPqfgacPF5h1Vye0PGYXZAczD usBGcyO2W5F2d7ErfrmT+BXH3UhqbLI74n5+Srxs1wR4KbGuf6cP72WqtEdRP/Xgtaha /BS3BhWPh4rlyAXfbdesrJleGFvpKTgYKEk0FQZ2t2LPSPfndV53ctqNzDuuWwQj32Rl 4Czi1Kev6/8QfEBE2vg8K8d2wJwJq/uXmMvqZGyw0+T+1UHPnLWlmXjsyz9KLzPwRINw w1/Jhs29eOl5Od4tkqj6gte1lMghLNtYicy9vy4xComgnOYJTe6xli+sG+hVDJnqCqDq u6Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Z1XATC9uFabr/cJUUJjAm1EmvJAVsCV0ZzQGqjrP+zA=; b=gBkLhsOHDJWjZ/nAy4T/nrodNsNiT8aQOve8+oJ066pBpKO5cxRO/QBD7Ndljei7RZ gV7pCBFZ53q13SjdKToG3In6QBEw1iZtJJZX9vSHQPDkaHBkSGybhQls1QGS1Ii30nKe mags0/I6hjgZf7dV0YPdVCSRDFHkMhQdvw5j3VQbc47oScY9t69I6vinrdDowNEI/Rgs RRI7fluT8L++pElPhlw1L3f6VFFA714uujdlCydbhlJ2w2jgMtTBPbiS2Y4yTbPz4lbc e59+JL4T2GYnMf7xa8DNlYWs/sHoT+osP0CUgXuOvdU9QIUCK0Kov2mJY5f1ea2odCPr OLcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z+GBZ3Hl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds9-20020a170907724900b006f4697bd26bsi982039ejc.636.2022.05.16.18.18.36; Mon, 16 May 2022 18:19:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z+GBZ3Hl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S244135AbiEPNvk (ORCPT + 99 others); Mon, 16 May 2022 09:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240567AbiEPNuS (ORCPT ); Mon, 16 May 2022 09:50:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F9F13A5DA; Mon, 16 May 2022 06:49:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A62F9B81216; Mon, 16 May 2022 13:49:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 618BAC3411A; Mon, 16 May 2022 13:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652708957; bh=Z1XATC9uFabr/cJUUJjAm1EmvJAVsCV0ZzQGqjrP+zA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Z+GBZ3HlMnS5S30k9vIXcOgsZZ9s2NTFIiE1HhvkWvPHy1bjZ00LgZTijr0M8KGmr STXCnHM85F+TIeIvpPTpG9lJp1vA2Dm/Llye5llcupfFc3DrhRP+8bTa1WAu66TGeA j/DsK4XK2TUXXSmd4/EUmmfxHNWV6eBhb+iN8YrybsUGbavpI8spHpzmskqUGIvWti bNesjElLh27daCKCjj83GRo5P9odygoLEUSbXWLeoVpn5VGXa0/BMtY5u5Z+8Zq3Yz Dxa7iXnhmdyqASNVfz96SqOorM96PaPLHL4R1RBqW+eHT3/L6di0va0g0SOjYdn1qn w4pbcCKlq/PAQ== Received: by mail-ed1-f51.google.com with SMTP id y21so18436156edo.2; Mon, 16 May 2022 06:49:17 -0700 (PDT) X-Gm-Message-State: AOAM533ImvKH7a3KRENUQ2DkkfvR+4Qv5+fQI6y0XwDSBU7tzQraS5D/ fUWvmZXYcs/aGL6LLJerI/dYOGPh3kc0naJ5Jw== X-Received: by 2002:a05:6402:35c7:b0:427:d231:3740 with SMTP id z7-20020a05640235c700b00427d2313740mr13373747edc.40.1652708955614; Mon, 16 May 2022 06:49:15 -0700 (PDT) MIME-Version: 1.0 References: <20220429220933.1350374-1-saravanak@google.com> In-Reply-To: From: Rob Herring Date: Mon, 16 May 2022 08:49:03 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1] driver core: Extend deferred probe timeout on driver registration To: Saravana Kannan Cc: Jonathan Corbet , Greg Kroah-Hartman , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linus Walleij , Will Deacon , Ulf Hansson , Kevin Hilman , Thierry Reding , Mark Brown , Pavel Machek , Geert Uytterhoeven , Yoshihiro Shimoda , Paul Kocialkowski , "open list:GPIO SUBSYSTEM" , "open list:THERMAL" , Linux IOMMU , Android Kernel Team , Linux Doc Mailing List , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 13, 2022 at 12:26 PM Saravana Kannan wrote: > > On Fri, May 13, 2022 at 6:58 AM Rob Herring wrote: > > > > On Fri, Apr 29, 2022 at 5:09 PM Saravana Kannan wrote: > > > > > > The deferred probe timer that's used for this currently starts at > > > late_initcall and runs for driver_deferred_probe_timeout seconds. The > > > assumption being that all available drivers would be loaded and > > > registered before the timer expires. This means, the > > > driver_deferred_probe_timeout has to be pretty large for it to cover the > > > worst case. But if we set the default value for it to cover the worst > > > case, it would significantly slow down the average case. For this > > > reason, the default value is set to 0. > > > > > > Also, with CONFIG_MODULES=y and the current default values of > > > driver_deferred_probe_timeout=0 and fw_devlink=on, devices with missing > > > drivers will cause their consumer devices to always defer their probes. > > > This is because device links created by fw_devlink defer the probe even > > > before the consumer driver's probe() is called. > > > > > > Instead of a fixed timeout, if we extend an unexpired deferred probe > > > timer on every successful driver registration, with the expectation more > > > modules would be loaded in the near future, then the default value of > > > driver_deferred_probe_timeout only needs to be as long as the worst case > > > time difference between two consecutive module loads. > > > > > > So let's implement that and set the default value to 10 seconds when > > > CONFIG_MODULES=y. > > > > We had to revert a non-zero timeout before (issue with NFS root IIRC). > > Does fw_devlink=on somehow fix that? > > If it's the one where ip autoconfig was timing out, then John Stultz > fixed it by fixing wait_for_device_probe(). > https://lore.kernel.org/all/20200422203245.83244-4-john.stultz@linaro.org/ Yeah, that was it. Acked-by: Rob Herring