Re: Default async probing for DT based systems

From: Frank Rowand
Date: Thu Jun 16 2022 - 12:46:48 EST


Hi Saravana,

You failed to include me in the distribution. Adding myself now...

-Frank

On 6/15/22 23:24, Saravana Kannan wrote:
> Hi,
>
> TL;DR: I want to improve boot times by enabling async probing by
> default for DT based systems. Can you give it a shot please?
>
> Why do you think it might work when async probing has been a pain before?
> ==========================================================
> Since fw_devlink=on is the default behavior and fw_devlink understands
> approximately 24 DT bindings, it should capture most of the device
> dependencies and ensure proper probe ordering. For example, on a Pixel
> 6, fw_devlink figures out 325 dependencies that it uses to enforce
> probe ordering.
>
> You can find all the dependencies under /sys/class/devlink.
>
> Fine! What do you want me to try?
> ==========================
> With the patches that have landed in 5.19-rc1, we can now enable
> default async probing for all built-in drivers by adding the following
> to the kernel command line:
>
> driver_async_probe=*
>
> I'd really appreciate it if folks can try adding driver_async_probe=*
> to their kernel command line and report any boot time
> improvements/regression or boot/probe failures it causes.
>
> (* insert cat begging pic *)
> Can I haz some reports pleez?!
>
> Tips:
> ====
> One easy way to check for devices probe failures is to compare the
> output of this command with/without the commandline changes:
>
> # find /sys/devices -name driver
>
> Btw, if you need to force sync probing for a few drivers so that your
> rootfs mounts properly, you can set the flag in the driver, or you can
> list them as exceptions following the * in the command line option.
> For example:
> driver_async_probe=*,my_flash_driver,my_sdio_driver
>
> Report these too.
>
> Known issues:
> ===========
> fw_devlink doesn't yet support phy-handle and mdio-parent DT bindings.
> They have some tricky issues I need to resolve first and I need to add
> both of them together -- I'm working on it. If there are other DT
> bindings that are missing support, do let me know. Most of them are
> easy to add.
>
> The driver_async_probe=* won't have any useful impact for modules
> without adding <module_name>.async_probe to the commandline or
> async_probe as a module option when loading it. This is because
> modules intentionally force sync before they exit. There's a patch for
> a global flag for modules too [1], but it can never be set by default
> for userspace reasons[2].
>
> [1] - https://lore.kernel.org/lkml/20220604010101.719508-1-saravanak@xxxxxxxxxx/
> [2] - https://lore.kernel.org/lkml/CA+55aFxV40V2WvNtJY3EC0F-B9wPk8CV2o1TTTyoF4CoWH7rhQ@xxxxxxxxxxxxxx/
>
> Thanks,
> Saravana
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel