Comments in linux/device/driver.h say that the goal is to do async probing on all devices. The current behavior unnecessarily slows down the boot by synchronously probing dax devices, so let's change that.
For thousands of devices, this change saves >1s of boot time. Signed-off-by: Michal Clapinski <[email protected]> --- drivers/dax/cxl.c | 1 + drivers/dax/device.c | 3 +++ drivers/dax/hmem/hmem.c | 2 ++ drivers/dax/kmem.c | 3 +++ drivers/dax/pmem.c | 1 + 5 files changed, 10 insertions(+) diff --git a/drivers/dax/cxl.c b/drivers/dax/cxl.c index 13cd94d32ff7..90734ddbd369 100644 --- a/drivers/dax/cxl.c +++ b/drivers/dax/cxl.c @@ -38,6 +38,7 @@ static struct cxl_driver cxl_dax_region_driver = { .id = CXL_DEVICE_DAX_REGION, .drv = { .suppress_bind_attrs = true, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/dax/device.c b/drivers/dax/device.c index 2bb40a6060af..74f2381a7df6 100644 --- a/drivers/dax/device.c +++ b/drivers/dax/device.c @@ -470,6 +470,9 @@ static int dev_dax_probe(struct dev_dax *dev_dax) static struct dax_device_driver device_dax_driver = { .probe = dev_dax_probe, .type = DAXDRV_DEVICE_TYPE, + .drv = { + .probe_type = PROBE_PREFER_ASYNCHRONOUS, + }, }; static int __init dax_init(void) diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c index c18451a37e4f..5a6d99d90f77 100644 --- a/drivers/dax/hmem/hmem.c +++ b/drivers/dax/hmem/hmem.c @@ -45,6 +45,7 @@ static struct platform_driver dax_hmem_driver = { .probe = dax_hmem_probe, .driver = { .name = "hmem", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; @@ -131,6 +132,7 @@ static struct platform_driver dax_hmem_platform_driver = { .probe = dax_hmem_platform_probe, .driver = { .name = "hmem_platform", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c index c036e4d0b610..4bfaab2cb728 100644 --- a/drivers/dax/kmem.c +++ b/drivers/dax/kmem.c @@ -274,6 +274,9 @@ static struct dax_device_driver device_dax_kmem_driver = { .probe = dev_dax_kmem_probe, .remove = dev_dax_kmem_remove, .type = DAXDRV_KMEM_TYPE, + .drv = { + .probe_type = PROBE_PREFER_ASYNCHRONOUS, + }, }; static int __init dax_kmem_init(void) diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c index bee93066a849..737654e8c5e8 100644 --- a/drivers/dax/pmem.c +++ b/drivers/dax/pmem.c @@ -77,6 +77,7 @@ static struct nd_device_driver dax_pmem_driver = { .probe = dax_pmem_probe, .drv = { .name = "dax_pmem", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .type = ND_DRIVER_DAX_PMEM, }; -- 2.51.1.821.gb6fe4d2222-goog

