lkml.org 
[lkml]   [2020]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v1 00/18] Refactor fw_devlink to significantly improve boot time
    On Wed, Nov 4, 2020 at 3:23 PM Saravana Kannan <saravanak@google.com> wrote:
    >
    > The current implementation of fw_devlink is very inefficient because it
    > tries to get away without creating fwnode links in the name of saving
    > memory usage. Past attempts to optimize runtime at the cost of memory
    > usage were blocked with request for data showing that the optimization
    > made significant improvement for real world scenarios.
    >
    > We have those scenarios now. There have been several reports of boot
    > time increase in the order of seconds in this thread [1]. Several OEMs
    > and SoC manufacturers have also privately reported significant
    > (350-400ms) increase in boot time due to all the parsing done by
    > fw_devlink.
    >
    > So this patch series refactors fw_devlink to be more efficient. The key
    > difference now is the addition of support for fwnode links -- just a few
    > simple APIs. This also allows most of the code to be moved out of
    > firmware specific (DT mostly) code into driver core.
    >
    > This brings the following benefits:
    > - Instead of parsing the device tree multiple times (complexity was
    > close to O(N^3) where N in the number of properties) during bootup,
    > fw_devlink parses each fwnode node/property only once and creates
    > fwnode links. The rest of the fw_devlink code then just looks at these
    > fwnode links to do rest of the work.
    >
    > - Makes it much easier to debug probe issue due to fw_devlink in the
    > future. fw_devlink=on blocks the probing of devices if they depend on
    > a device that hasn't been added yet. With this refactor, it'll be very
    > easy to tell what that device is because we now have a reference to
    > the fwnode of the device.
    >
    > - Much easier to add fw_devlink support to ACPI and other firmware
    > types. A refactor to move the common bits from DT specific code to
    > driver core was in my TODO list as a prerequisite to adding ACPI
    > support to fw_devlink. This series gets that done.
    >
    > Tomi/Laurent/Grygorii,
    >
    > If you can test this series, that'd be great!
    >
    > Thanks,
    > Saravana
    >
    > [1] - https://lore.kernel.org/linux-pm/CAGETcx-aiW251dhEXT1GNb9bi6YcX8W=jLBrro5CnPuEjGL09g@mail.gmail.com/

    Forgot the update this link in the cover letter. Here's a much better
    link to the thread that discusses boot time regression:
    https://lore.kernel.org/linux-omap/ea02f57e-871d-cd16-4418-c1da4bbc4696@ti.com/


    -Saravana

    \
     
     \ /
      Last update: 2020-11-05 00:28    [W:4.195 / U:0.192 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site