2022-10-28 23:22:39

by Brian Norris

[permalink] [raw]
Subject: [PATCH] mmc: sdhci-pci: Set PROBE_PREFER_ASYNCHRONOUS

This driver often takes on the order of 10ms to start, but in some cases
as much as 190ms. It shouldn't have many cross-device dependencies to
race with, nor racy access to shared state with other drivers, so this
should be a relatively low risk change. We've done similarly with a
variety of other MMC host drivers already.

This driver was pinpointed as part of a survey of top slowest initcalls
(i.e., are built in, and probing synchronously) on a lab of ChromeOS
systems.

Signed-off-by: Brian Norris <[email protected]>
---

drivers/mmc/host/sdhci-pci-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 34ea1acbb3cc..0449630acbb3 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -2281,7 +2281,8 @@ static struct pci_driver sdhci_driver = {
.probe = sdhci_pci_probe,
.remove = sdhci_pci_remove,
.driver = {
- .pm = &sdhci_pci_pm_ops
+ .pm = &sdhci_pci_pm_ops,
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};

--
2.38.1.273.g43a17bfeac-goog



2022-11-02 10:55:55

by Adrian Hunter

[permalink] [raw]
Subject: Re: [PATCH] mmc: sdhci-pci: Set PROBE_PREFER_ASYNCHRONOUS

On 29/10/22 01:56, Brian Norris wrote:
> This driver often takes on the order of 10ms to start, but in some cases
> as much as 190ms. It shouldn't have many cross-device dependencies to
> race with, nor racy access to shared state with other drivers, so this
> should be a relatively low risk change. We've done similarly with a
> variety of other MMC host drivers already.
>
> This driver was pinpointed as part of a survey of top slowest initcalls
> (i.e., are built in, and probing synchronously) on a lab of ChromeOS
> systems.
>
> Signed-off-by: Brian Norris <[email protected]>

Acked-by: Adrian Hunter <[email protected]>

> ---
>
> drivers/mmc/host/sdhci-pci-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 34ea1acbb3cc..0449630acbb3 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -2281,7 +2281,8 @@ static struct pci_driver sdhci_driver = {
> .probe = sdhci_pci_probe,
> .remove = sdhci_pci_remove,
> .driver = {
> - .pm = &sdhci_pci_pm_ops
> + .pm = &sdhci_pci_pm_ops,
> + .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> },
> };
>


2022-11-07 21:02:44

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH] mmc: sdhci-pci: Set PROBE_PREFER_ASYNCHRONOUS

On Sat, 29 Oct 2022 at 00:56, Brian Norris <[email protected]> wrote:
>
> This driver often takes on the order of 10ms to start, but in some cases
> as much as 190ms. It shouldn't have many cross-device dependencies to
> race with, nor racy access to shared state with other drivers, so this
> should be a relatively low risk change. We've done similarly with a
> variety of other MMC host drivers already.
>
> This driver was pinpointed as part of a survey of top slowest initcalls
> (i.e., are built in, and probing synchronously) on a lab of ChromeOS
> systems.
>
> Signed-off-by: Brian Norris <[email protected]>

Applied for next, thanks!

Kind regards
Uffe


> ---
>
> drivers/mmc/host/sdhci-pci-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 34ea1acbb3cc..0449630acbb3 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -2281,7 +2281,8 @@ static struct pci_driver sdhci_driver = {
> .probe = sdhci_pci_probe,
> .remove = sdhci_pci_remove,
> .driver = {
> - .pm = &sdhci_pci_pm_ops
> + .pm = &sdhci_pci_pm_ops,
> + .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> },
> };
>
> --
> 2.38.1.273.g43a17bfeac-goog
>