Skip to content

deferred_probe_timeout logic clean up

Saravana Kannan linux-gpio linux-iommu linux-pm linux-renesas-soc lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 60 repliesIn review
  2. v1 RFC9 patches 12 repliesSuperseded

Changes in v2 from the cover letter

Rewrote the NFS rootfs fix to be a lot less destructive on the fw_devlink ordering for devices that don't end up probing during the "best effort" attempt at probing all devices needed for a network rootfs

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9PM: domains: Delete usage of driver_deferred_probe_check_state()drivers/base/power/domain.c+1 -135 replies
2/9pinctrl: devicetree: Delete usage of driver_deferred_probe_check_state()drivers/pinctrl/devicetree.c+1 -10 replies
3/9net: mdio: Delete usage of driver_deferred_probe_check_state()drivers/net/mdio/fwnode_mdio.c+1 -34 replies
4/9driver core: Add wait_for_init_devices_probe helper functiondrivers/base/base.h drivers/base/core.c drivers/base/dd.c +1 more+110 -110 replies
5/9net: ipconfig: Relax fw_devlink if we need to mount a network rootfsnet/ipv4/ipconfig.c+6 -00 replies
6/9Revert "driver core: Set default deferred_probe_timeout back to 0."drivers/base/dd.c+5 -03 replies
7/9driver core: Set fw_devlink.strict=1 by defaultdrivers/base/core.c+1 -18 replies
8/9iommu/of: Delete usage of driver_deferred_probe_check_state()drivers/iommu/of_iommu.c+1 -11 reply
9/9driver core: Delete driver_deferred_probe_check_state()drivers/base/dd.c include/linux/device/driver.h+0 -310 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchGeert UytterhoevenUlf Hansson
SeriesT-b
1/9R-b
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/9] deferred_probe_timeout logic clean up

This series is based on linux-next + these 2 small patches applies on top:
https://lore.kernel.org/lkml/[email protected]/

A lot of the deferred_probe_timeout logic is redundant with fw_devlink=on. Also, enabling deferred_probe_timeout by default breaks a few cases.

This series tries to delete the redundant logic, simplify the frameworks that use driver_deferred_probe_check_state(), enable deferred_probe_timeout=10 by default, and fixes the nfsroot failure case.

The overall idea of this series is to replace the global behavior of driver_deferred_probe_check_state() where all devices give up waiting on supplier at the same time with a more granular behavior:

1. Devices with all their suppliers successfully probed by late_initcall probe as usual and avoid unnecessary deferred probe attempts.

2. At or after late_initcall, in cases where boot would break because of fw_devlink=on being strict about the ordering, we

a. Temporarily relax the enforcement to probe any unprobed devices
that can probe successfully in the current state of the system. For example, when we boot with a NFS rootfs and no network device has probed.
b. Go back to enforcing the ordering for any devices that haven't
probed.

3. After deferred probe timeout expires, we permanently give up waiting on supplier devices without drivers. At this point, whatever devices can probe without some of their optional suppliers end up probing.

In the case where module support is disabled, it's fairly straightforward and all device probes are completed before the initcalls are done.

Patches 1 to 3 are fairly straightforward and can probably be applied right away.

Patches 4 to 6 are for fixing the NFS rootfs issue and setting the default deferred_probe_timeout back to 10 seconds when modules are enabled.

Patches 7 to 9 are further clean up of the deferred_probe_timeout logic so that no framework has to know/care about deferred_probe_timeout.

Yoshihiro/Geert,

If you can test this patch series and confirm that the NFS root case works, I'd really appreciate that.

Thanks,
Saravana

v1 -> v2:
Rewrote the NFS rootfs fix to be a lot less destructive on the fw_devlink ordering for devices that don't end up probing during the "best effort" attempt at probing all devices needed for a network rootfs

Saravana Kannan (9):
PM: domains: Delete usage of driver_deferred_probe_check_state()
pinctrl: devicetree: Delete usage of
driver_deferred_probe_check_state()
net: mdio: Delete usage of driver_deferred_probe_check_state() driver core: Add wait_for_init_devices_probe helper function
net: ipconfig: Relax fw_devlink if we need to mount a network rootfs Revert "driver core: Set default deferred_probe_timeout back to 0." driver core: Set fw_devlink.strict=1 by default
iommu/of: Delete usage of driver_deferred_probe_check_state() driver core: Delete driver_deferred_probe_check_state()

 drivers/base/base.h            |   1 +
 drivers/base/core.c            | 102 ++++++++++++++++++++++++++++++---
 drivers/base/dd.c              |  54 ++++++-----------
 drivers/base/power/domain.c    |   2 +-
 drivers/iommu/of_iommu.c       |   2 +-
 drivers/net/mdio/fwnode_mdio.c |   4 +-
 drivers/pinctrl/devicetree.c   |   2 +-
 include/linux/device/driver.h  |   2 +-
 net/ipv4/ipconfig.c            |   6 ++
 9 files changed, 126 insertions(+), 49 deletions(-)
Signature · 6 lines
2.36.1.255.ge46751e96f-goog

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu