Skip to content

Optimize fw_devlink parsing

Saravana Kannan linux-acpi linux-devicetree linux-renesas-soc linux-samsung-soc lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4driver core: Move code to the right part of the filedrivers/base/core.c+30 -300 replies
2/4driver core: Look for waiting consumers only for a fwnode's primary devicedrivers/base/core.c+18 -110 replies
3/4driver core: fw_devlink: Add support for batching fwnode parsingdrivers/base/base.h drivers/base/core.c drivers/base/dd.c +1 more+120 -70 replies
4/4of: platform: Batch fwnode parsing when adding all top level devicesdrivers/of/platform.c+2 -015 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/4] Optimize fw_devlink parsing

When fw_devlink is enabled on hardware with a large number of device tree nodes, the initial device addition done in of_platform_default_populate_init() can be very inefficient. This is because most devices will fail to find all their suppliers when they are added and will keep trying to parse their device tree nodes and link to any newly added devices

This was an item on my TODO list that I'm finally getting around to. On hardware I'm testing on, this saved 1.216 _seconds_! Another SoC vendor was also able to test a similar but hacky patch series and confirmed that it saved them around 1 second.

Thanks,
Saravana
P.S: It took me longer to write the comments than the code!

Saravana Kannan (4):
driver core: Move code to the right part of the file driver core: Look for waiting consumers only for a fwnode's primary
device
driver core: fw_devlink: Add support for batching fwnode parsing
of: platform: Batch fwnode parsing when adding all top level devices

 drivers/base/base.h    |   1 +
 drivers/base/core.c    | 193 ++++++++++++++++++++++++++++++++---------
 drivers/base/dd.c      |   8 ++
 drivers/of/platform.c  |   2 +
 include/linux/fwnode.h |   2 +
 5 files changed, 164 insertions(+), 42 deletions(-)
Signature · 1 line
2.26.2.761.g0e0b3e54be-goog