Skip to contentSkip to conversation

dax: add PROBE_PREFER_ASYNCHRONOUS to all dax drivers

PATCH Superseded Michal Clapinski 2 participants 2 messages Oct 24, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dax: add PROBE_PREFER_ASYNCHRONOUS to all dax drivers

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.

---
 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(+)
drivers/dax/cxl.c +1 -0
index 13cd94d32ff7..90734ddbd369 100644
@@ -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,
 	},
 };
 
drivers/dax/device.c +3 -0
index 2bb40a6060af..74f2381a7df6 100644
@@ -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)
drivers/dax/hmem/hmem.c +2 -0
index c18451a37e4f..5a6d99d90f77 100644
@@ -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,
 	},
 };
 
drivers/dax/kmem.c +3 -0
index c036e4d0b610..4bfaab2cb728 100644
@@ -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)
drivers/dax/pmem.c +1 -0
index bee93066a849..737654e8c5e8 100644
@@ -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,
 };
Signature · 1 line
2.51.1.821.gb6fe4d2222-goog
Reviewed-by on v2 1/1
#1 lore raw
Quoted 5 lines · Michal Clapinski

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.

Please split this into 5 patches just so each can cause independent / bisectable regressions, but other than that you can add: