[PATCH v3 0/5] dax: add PROBE_PREFER_ASYNCHRONOUS to all the dax drivers

Michal Clapinski posted 5 patches 3 months, 2 weeks ago
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(+)
[PATCH v3 0/5] dax: add PROBE_PREFER_ASYNCHRONOUS to all the dax drivers
Posted by Michal Clapinski 3 months, 2 weeks ago
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.

Michal Clapinski (5):
  dax: add PROBE_PREFER_ASYNCHRONOUS to the pmem driver
  dax: add PROBE_PREFER_ASYNCHRONOUS to the kmem driver
  dax: add PROBE_PREFER_ASYNCHRONOUS to the cxl driver
  dax: add PROBE_PREFER_ASYNCHRONOUS to the hmem drivers
  dax: add PROBE_PREFER_ASYNCHRONOUS to the dax device driver

 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(+)

-- 
2.51.1.821.gb6fe4d2222-goog
Re: [PATCH v3 0/5] dax: add PROBE_PREFER_ASYNCHRONOUS to all the dax drivers
Posted by dan.j.williams@intel.com 2 months, 2 weeks ago
Michal Clapinski wrote:
> 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.
> 
> Michal Clapinski (5):
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the pmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the kmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the cxl driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the hmem drivers
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the dax device driver

After seeing the trouble this causes with libdaxctl and failing to find
a quick fix I wonder if you should just go through route of eating the
potential regressions in your own environment.

I.e. instead of making it a problem that the kernel needs to debug for
all legacy users, how about you just boot with the command line option:

   driver_async_probe=device_dax

...or add the following to your mopdrobe configuration:

   options device_dax async_probe

I.e. do you really need to change this policy globally for everyone at
this point?

I do want to improve this, but I think it will take time for libdaxctl
to get ready for this flag day.
Re: [PATCH v3 0/5] dax: add PROBE_PREFER_ASYNCHRONOUS to all the dax drivers
Posted by Michał Cłapiński 2 months, 2 weeks ago
On Fri, Nov 21, 2025 at 1:59 AM <dan.j.williams@intel.com> wrote:
>
> Michal Clapinski wrote:
> > 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.
> >
> > Michal Clapinski (5):
> >   dax: add PROBE_PREFER_ASYNCHRONOUS to the pmem driver
> >   dax: add PROBE_PREFER_ASYNCHRONOUS to the kmem driver
> >   dax: add PROBE_PREFER_ASYNCHRONOUS to the cxl driver
> >   dax: add PROBE_PREFER_ASYNCHRONOUS to the hmem drivers
> >   dax: add PROBE_PREFER_ASYNCHRONOUS to the dax device driver
>
> After seeing the trouble this causes with libdaxctl and failing to find
> a quick fix I wonder if you should just go through route of eating the
> potential regressions in your own environment.
>
> I.e. instead of making it a problem that the kernel needs to debug for
> all legacy users, how about you just boot with the command line option:
>
>    driver_async_probe=device_dax
>
> ...or add the following to your mopdrobe configuration:
>
>    options device_dax async_probe
>
> I.e. do you really need to change this policy globally for everyone at
> this point?

I'll do that or I'll just cherry-pick this to our kernel. Thank you.

> I do want to improve this, but I think it will take time for libdaxctl
> to get ready for this flag day.
Re: [PATCH v3 0/5] dax: add PROBE_PREFER_ASYNCHRONOUS to all the dax drivers
Posted by Michał Cłapiński 2 months, 3 weeks ago
On Fri, Oct 24, 2025 at 11:05 PM Michal Clapinski <mclapinski@google.com> wrote:
>
> 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.
>
> Michal Clapinski (5):
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the pmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the kmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the cxl driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the hmem drivers
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the dax device driver
>
>  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(+)
>
> --
> 2.51.1.821.gb6fe4d2222-goog
>

+Ira (you're not listed as a maintainer of drivers/dax/ in the MAINTAINERS file)

Is there anything else required from my side or can this be merged?
Re: [PATCH v3 0/5] dax: add PROBE_PREFER_ASYNCHRONOUS to all the dax drivers
Posted by Dave Jiang 3 months, 1 week ago

On 10/24/25 2:05 PM, Michal Clapinski wrote:
> 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.
> 
> Michal Clapinski (5):
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the pmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the kmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the cxl driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the hmem drivers
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the dax device driver
> 
>  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(+)
> 

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
for the series
Re: [PATCH v3 0/5] dax: add PROBE_PREFER_ASYNCHRONOUS to all the dax drivers
Posted by dan.j.williams@intel.com 3 months, 2 weeks ago
Michal Clapinski wrote:
> 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.
> 
> Michal Clapinski (5):
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the pmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the kmem driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the cxl driver
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the hmem drivers
>   dax: add PROBE_PREFER_ASYNCHRONOUS to the dax device driver

Looks good, thanks for the split.