Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp939113iob; Fri, 13 May 2022 17:08:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwObUjYnEkFjBjz8R/z9FVZDtPB1nOOoC6+1QLkW80YqxvALqn6HoS5iSLoKH45v5NJ9C7S X-Received: by 2002:adf:f5d2:0:b0:20c:df6d:b7e9 with SMTP id k18-20020adff5d2000000b0020cdf6db7e9mr5695990wrp.363.1652486917772; Fri, 13 May 2022 17:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652486917; cv=none; d=google.com; s=arc-20160816; b=l/V2oDs3+p51lefyKXL9ehWUTx07aG8pcYTgzxgIVdQNc8KDghSvo7dmZJFHQ9q/8t UvlnKluv7tKkWflmgu3dFBHL+o/3IHOzkWT/+zc2vYHqYSUMUs7g1CC0+/yiX5wVcma7 BvTCKPTJnqQ7mpFiSMB0WEGetLh0I7SktjVpWA6WSpZb/KEPVn6KOhI2q91u5sFdj1zi shU8fvpXoZD5Te3FMhVwjc9Iqchufq3W+TI+kJvqmpu/lyqQmiu2uxMxggncNu4RwJB0 jKLYI1S5Kwd5+B2mA7revPjjAhY/db80VwAuM0hOoVqwgZURBv2AqvIiC3dMfkA8OXJk T//w== 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=Q9uWqroQBrMhNpZ56AYK8kAafrfYjv57IuXu6ljniEI=; b=IlwljotDfhXA/eId4sR9oXLgPhBD5gqDk+ybevMIjCjNoK7LFLXsEOQHLKCkSSerDu DRgpFOblBj+ElAaBWJjBA9Mr0ZueZ8RvNfQ02N7RyFunAsKJ2qIx2jwfw8mJHJ9Bxq0m RQG3LlDrTL49IutC40vuSqn0wNY08tIC6TOeeNTFqBZuIfBvyobYIxcs9+yZC14NikGw JSQbV94DiUHo0Uyl7Wknf6bQk2f85Idu5FHWjHdguqgYhsMoO0eB8CGpPMBDoT1sz/Nm zw+60DKs84DwNazXthcwsM7AsHhsYaE8/q+//Vf6R6z0K4aYYGCplVR5SI+vnwsrk5rC uSiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kP2duuHm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f13-20020a7bcd0d000000b00394696b3e8bsi3449528wmj.162.2022.05.13.17.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:08:37 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kP2duuHm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B21392E9F24; Fri, 13 May 2022 16:10:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232109AbiEMN6f (ORCPT + 99 others); Fri, 13 May 2022 09:58:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229893AbiEMN6a (ORCPT ); Fri, 13 May 2022 09:58:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB0677A80F; Fri, 13 May 2022 06:58:27 -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 964D9B82EA3; Fri, 13 May 2022 13:58:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50582C3411C; Fri, 13 May 2022 13:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652450305; bh=Q9uWqroQBrMhNpZ56AYK8kAafrfYjv57IuXu6ljniEI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kP2duuHmNgNTr23wQ3jJV4ACqVDoXiHvJmOEfYJk9MtvU/pYg6PV8inmVYuf8+isB OWLyTHjbPFfaEjxgSziDDit9HdhUJhWWhqRm5d2BsSBvMqiC2R4TR7y+3zJ8IjEiVG WabOU9VbStlIep5W1f5eZh/z3GxAg+zdPHTSMXcFiNzrXBt07iC7jTjCXO/cCBD7Tr g5R8OCcieFgvfgNaw51Kue7VWHPY/Pe4dB6Y+VHDOsIT1B/hzKlmblJJQzwBpfQCxE omgpjYXMk/DBrwTM8vOrcZbjODXWEn7uaBq22v744sg/OpLNPSfRbQREn5rP1vkkil WY3HkUDaQCkLg== Received: by mail-pj1-f49.google.com with SMTP id x88so8174301pjj.1; Fri, 13 May 2022 06:58:25 -0700 (PDT) X-Gm-Message-State: AOAM532qMBz0C3/3yCC9Eejuwc0gZc0NULASTSCFbveL0OENFOX0+gbP PyJrwqk/O1aKsOI44u7gcrbh24YKck375Ui3Iw== X-Received: by 2002:a17:902:9345:b0:15f:186b:e478 with SMTP id g5-20020a170902934500b0015f186be478mr4834270plp.117.1652450304740; Fri, 13 May 2022 06:58:24 -0700 (PDT) MIME-Version: 1.0 References: <20220429220933.1350374-1-saravanak@google.com> In-Reply-To: <20220429220933.1350374-1-saravanak@google.com> From: Rob Herring Date: Fri, 13 May 2022 08:58:11 -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=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, 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? Rob