All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: Request driver probe from an async task
@ 2018-04-23 12:05 Paul Menzel
  2018-04-23 12:21   ` Takashi Iwai
  0 siblings, 1 reply; 13+ messages in thread
From: Paul Menzel @ 2018-04-23 12:05 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1490 bytes --]

From: Paul Menzel <pmenzel@molgen.mpg.de>
Date: Sat, 24 Mar 2018 09:28:43 +0100

On an ASRock E350M1, with Linux 4.17-rc1 according to `initcall_debug`
calling `azx_driver_init` takes sometimes more than a few milliseconds,
and up to 200 ms.

```
[    2.892598] calling  azx_driver_init+0x0/0xfe4 [snd_hda_intel] @ 218
[    2.943002] initcall azx_driver_init+0x0/0xfe4 [snd_hda_intel] 
returned 0 after 49195 usecs
```

Trying to execute the Linux kernel in less than 500 ms, this is quite a
hold-up, and therefore request the probe from an async task.

With this change, the test shows, that the function returns earlier.

```
[    3.254800] calling  azx_driver_init+0x0/0xfe4 [snd_hda_intel] @ 227
[    3.254887] initcall azx_driver_init+0x0/0xfe4 [snd_hda_intel] 
returned 0 after 66 usecs
```

The same behavior is visible on a Dell OptiPlex 7010. The longer times
seem to happen, when the module *e1000e* is probed during the same time.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
  sound/pci/hda/hda_intel.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 6347256bc017..827834b9c07d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2671,6 +2671,7 @@ static struct pci_driver azx_driver = {
  	.driver = {
  		.pm = AZX_PM_OPS,
  	},
+	.driver.probe_type = PROBE_PREFER_ASYNCHRONOUS,
  };

  module_pci_driver(azx_driver);
-- 
2.16.2


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-04-24 14:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 12:05 [PATCH] ALSA: hda: Request driver probe from an async task Paul Menzel
2018-04-23 12:21 ` Takashi Iwai
2018-04-23 12:21   ` Takashi Iwai
2018-04-23 12:30   ` Paul Menzel
2018-04-23 12:33     ` Takashi Iwai
2018-04-24 11:59       ` Paul Menzel
2018-04-24 11:59         ` Paul Menzel
2018-04-24 12:15         ` Takashi Iwai
2018-04-24 12:15           ` Takashi Iwai
2018-04-24 14:03           ` Paul Menzel
2018-04-24 14:03             ` Paul Menzel
2018-04-24 14:10             ` Takashi Iwai
2018-04-24 14:10               ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.