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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BA0DC43217 for ; Fri, 13 May 2022 17:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383033AbiEMR0m (ORCPT ); Fri, 13 May 2022 13:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382995AbiEMR0b (ORCPT ); Fri, 13 May 2022 13:26:31 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DF5D703E8 for ; Fri, 13 May 2022 10:26:29 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-2f7d7e3b5bfso97337677b3.5 for ; Fri, 13 May 2022 10:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yncJ85+SIlrUyfibchlOo3nGcBtZSYvrpkr6At33oFM=; b=tELgWSqPJ2XeK5KWJc0j3Izxo5P0JYNJpS1LDlgAuPlebbh9e6WMDgeVVLegGeIaAG VVkPFzkgs9492PO60P9XWePlc06wmWZFRlwvZJOZcx5xgrMhBpFW0sOXiKbdsVgYAIRK zjP+gEQNqrUKj69da/qFLQkvCuZ4GjCjn29S2q5SXBtTpeqs0++CM4HRgIxA5FD6F1rD PV/soEr2Mv4iexAm30OrWfc/UQepJQ0ZaQQ+CqJ76d1FTyEX4rQxfaOahQA70NByLksO DRAsanWwPBz8CdNJ7IaHIeXq66XPKKcVg1BFmGAU10mdurV7Lixpw2rYJxRhb1PbLjk0 QcmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yncJ85+SIlrUyfibchlOo3nGcBtZSYvrpkr6At33oFM=; b=xnnt9SLKnAb2wrK+SSIpmsVnKL44F6bcBjfV3sa9eGpcv0n/embPY1BZWdDH4ElzRe Ml1kUCK8CBAaoWGFm5fXIQzVXB/H49qiJIZCRXY3TS4kVAPT2ib3vPuEtLGaIRGQ6ukf peyDTc12Tdx/897kE5I+sVTwHECbN1W71csKc399zU957QMNzeGNPY7KKtj4wJMyZnBb UlhKKs/7siE/oGuvjepyjot0Ra16U9K4ixOnP4Mykd8ZtEzcdbXtWiax9S/TW0QwwC4b f1SuyoWoVm1DJb7PKlTOQhkmyPFISU1MK+mN82Bs6W4yLrRbIUqEbqy4mklLNZk5XA7l ZUqQ== X-Gm-Message-State: AOAM5310abX1DMdU6xWP37l9Hec2GFrteX6wzyJcJvLETpndQSjBPey0 Aq4yb/JTiP1EG2EbOfxohJ0ntZw2BqhZy4xhbmlPOw== X-Google-Smtp-Source: ABdhPJwDc39YV2aEhsT7aNk3yasAQxRbPZaXjabeYzrpzhFybpEVGwlpZU8+hsRWlLkM/kxsOCa4BRf6isC84kd7cTg= X-Received: by 2002:a81:1e09:0:b0:2fe:c53c:a0aa with SMTP id e9-20020a811e09000000b002fec53ca0aamr2051320ywe.455.1652462788378; Fri, 13 May 2022 10:26:28 -0700 (PDT) MIME-Version: 1.0 References: <20220429220933.1350374-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Fri, 13 May 2022 10:25:52 -0700 Message-ID: Subject: Re: [PATCH v1] driver core: Extend deferred probe timeout on driver registration To: Rob Herring 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" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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/ If you are referring to some other issue, then I'd need more details. -Saravana 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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C783C433EF for ; Fri, 13 May 2022 17:26:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B10958126C; Fri, 13 May 2022 17:26:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cupX9pAaAdc3; Fri, 13 May 2022 17:26:31 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8476C8126A; Fri, 13 May 2022 17:26:31 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 43B33C0032; Fri, 13 May 2022 17:26:31 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id AB2F5C002D for ; Fri, 13 May 2022 17:26:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 840B28124F for ; Fri, 13 May 2022 17:26:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j17ABqu0uIKJ for ; Fri, 13 May 2022 17:26:29 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by smtp1.osuosl.org (Postfix) with ESMTPS id A0EA381242 for ; Fri, 13 May 2022 17:26:29 +0000 (UTC) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-2f7bb893309so97086627b3.12 for ; Fri, 13 May 2022 10:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yncJ85+SIlrUyfibchlOo3nGcBtZSYvrpkr6At33oFM=; b=tELgWSqPJ2XeK5KWJc0j3Izxo5P0JYNJpS1LDlgAuPlebbh9e6WMDgeVVLegGeIaAG VVkPFzkgs9492PO60P9XWePlc06wmWZFRlwvZJOZcx5xgrMhBpFW0sOXiKbdsVgYAIRK zjP+gEQNqrUKj69da/qFLQkvCuZ4GjCjn29S2q5SXBtTpeqs0++CM4HRgIxA5FD6F1rD PV/soEr2Mv4iexAm30OrWfc/UQepJQ0ZaQQ+CqJ76d1FTyEX4rQxfaOahQA70NByLksO DRAsanWwPBz8CdNJ7IaHIeXq66XPKKcVg1BFmGAU10mdurV7Lixpw2rYJxRhb1PbLjk0 QcmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yncJ85+SIlrUyfibchlOo3nGcBtZSYvrpkr6At33oFM=; b=JqklXwBTH2eZq3MHCi2WVOP7BakWJ26q1DyDyBJU3yOSkILh/KyZch0/5x3Fwyd/dN P5wl8SVAAltw3naX6auii9kx9SlzPZGptITohd16yv/64KRaI1R5JWt2yCTbbwTt5mXB uUFApRtTnlUE2PTcGzGDFvVZ1DbPviVCHujjtuyiCZDj0HrLwiLVUUZNNqhaS3CxdR7R Pyl+7vL6/R9moS5MDg9G/OcdFh0fFpgZkVryc1jomYhDEItGERJuL59fUBQ0/EwGG1QG ie+AR/567z8Rv5L/bgluWpihaz+RT2xvj6DVv6JwpDfJGlbwWy6tLu2wq2BzNJKqbQY9 i16w== X-Gm-Message-State: AOAM5305xNkGTazsElHmXHl5hicBphYSS4hTdUmNY9u1bZa2ytVZHms2 aJyx/MydvdtHXQBqvw9nTJseVvMDDH/rR8XXTSUggA== X-Google-Smtp-Source: ABdhPJwDc39YV2aEhsT7aNk3yasAQxRbPZaXjabeYzrpzhFybpEVGwlpZU8+hsRWlLkM/kxsOCa4BRf6isC84kd7cTg= X-Received: by 2002:a81:1e09:0:b0:2fe:c53c:a0aa with SMTP id e9-20020a811e09000000b002fec53ca0aamr2051320ywe.455.1652462788378; Fri, 13 May 2022 10:26:28 -0700 (PDT) MIME-Version: 1.0 References: <20220429220933.1350374-1-saravanak@google.com> In-Reply-To: Date: Fri, 13 May 2022 10:25:52 -0700 Message-ID: Subject: Re: [PATCH v1] driver core: Extend deferred probe timeout on driver registration To: Rob Herring Cc: Ulf Hansson , Android Kernel Team , Linux Doc Mailing List , "Rafael J. Wysocki" , Greg Kroah-Hartman , Linus Walleij , Jonathan Corbet , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Paul Kocialkowski , Kevin Hilman , Linux IOMMU , Mark Brown , Geert Uytterhoeven , Pavel Machek , "open list:GPIO SUBSYSTEM" , "open list:THERMAL" , Thierry Reding , Will Deacon X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Saravana Kannan via iommu Reply-To: Saravana Kannan Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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/ If you are referring to some other issue, then I'd need more details. -Saravana _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu