[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUo1fV-O9x6C578G8+WdES2bH7yQjO56PErFwSu2LNNkw@mail.gmail.com>
Date: Wed, 20 Nov 2024 09:43:06 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Saravana Kannan <saravanak@...gle.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Francesco <francesco.dolcini@...adex.com>,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>, kernel-team@...roid.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] driver core: fw_devlink: Stop trying to optimize cycle
detection logic
Hi Saravana,
On Wed, Nov 20, 2024 at 3:04 AM Saravana Kannan <saravanak@...gle.com> wrote:
> On Tue, Nov 19, 2024 at 5:40 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > On Wed, Oct 30, 2024 at 6:10 PM Saravana Kannan <saravanak@...gle.com> wrote:
> > > In attempting to optimize fw_devlink runtime, I introduced numerous cycle
> > > detection bugs by foregoing cycle detection logic under specific
> > > conditions. Each fix has further narrowed the conditions for optimization.
> > >
> > > It's time to give up on these optimization attempts and just run the cycle
> > > detection logic every time fw_devlink tries to create a device link.
> > >
> > > The specific bug report that triggered this fix involved a supplier fwnode
> > > that never gets a device created for it. Instead, the supplier fwnode is
> > > represented by the device that corresponds to an ancestor fwnode.
> > >
> > > In this case, fw_devlink didn't do any cycle detection because the cycle
> > > detection logic is only run when a device link is created between the
> > > devices that correspond to the actual consumer and supplier fwnodes.
> > >
> > > With this change, fw_devlink will run cycle detection logic even when
> > > creating SYNC_STATE_ONLY proxy device links from a device that is an
> > > ancestor of a consumer fwnode.
> > >
> > > Reported-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
> > > Closes: https://lore.kernel.org/all/1a1ab663-d068-40fb-8c94-f0715403d276@ideasonboard.com/
> > > Fixes: 6442d79d880c ("driver core: fw_devlink: Improve detection of overlapping cycles")
> > > Tested-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
> > > Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> >
> > Thanks for your patch, which is now commit bac3b10b78e54b7d ("driver
> > core: fw_devlink: Stop trying to optimize cycle detection logic") in
> > next-20241107 and later.
> >
> > > Geert/Francesco,
> > >
> > > If you want to test this patch, pull it in and compare the output of
> > > the following:
> > >
> > > ls -1 /sys/class/devlink
> > >
> > > The only device links that should be missing with the patch should be
> > > device links in a cycle that weren't detected before.
> >
> > I gave it a try on all my boards, and compared the output on a few of
> > them, and everything looks fine.
>
> Thanks for testing the series Geert!
>
> And no noticeable boot time increases?
That's a bit hard to measure, as the serial console output easily takes
ten seconds.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists