All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Saravana Kannan <saravanak@google.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Francesco <francesco.dolcini@toradex.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	kernel-team@android.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] driver core: fw_devlink: Stop trying to optimize cycle detection logic
Date: Wed, 6 Nov 2024 05:52:59 +0100	[thread overview]
Message-ID: <2024110644-material-paternity-242f@gregkh> (raw)
In-Reply-To: <CAGETcx9MZbvg0ikfsWpJXYw=UzUjv3PerzN4RL1VFMjitBtYXw@mail.gmail.com>

On Tue, Nov 05, 2024 at 05:30:20PM -0800, Saravana Kannan wrote:
> On Wed, Oct 30, 2024 at 10:10 AM Saravana Kannan <saravanak@google.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@ideasonboard.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@ideasonboard.com>
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > ---
> >  drivers/base/core.c | 55 ++++++++++++++++++++-------------------------
> >  1 file changed, 24 insertions(+), 31 deletions(-)
> >
> > Tomi,
> >
> > Thanks for all the testing and debugging help! And do use
> > post-init-providers even with this patch to improve ordering
> > enforcement. I probably should change the cycle log from info to warn in
> > a separate patch :)
> >
> > Greg,
> >
> > I no longer have concerns about pulling this into 6.13. But we can give
> > a week or so to Geert/Francesco to do some additional testing.
> >
> > Geert/Francesco,
> 
> Heads up. Greg has pulled this into driver-core git's
> driver-core-testing branch. Which means in a week or two it'll get
> into the actual driver-core-next branch. So, if you want to do
> additional testing, you might want to jump on it soon.

It should now show up in the next linux-next release.

thanks,

greg k-h

  reply	other threads:[~2024-11-06  4:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 17:10 [PATCH v3] driver core: fw_devlink: Stop trying to optimize cycle detection logic Saravana Kannan
2024-11-06  1:30 ` Saravana Kannan
2024-11-06  4:52   ` Greg Kroah-Hartman [this message]
2024-11-19 13:40 ` Geert Uytterhoeven
2024-11-20  2:04   ` Saravana Kannan
2024-11-20  8:43     ` Geert Uytterhoeven
2024-12-04 11:48 ` Luca Ceresoli
2024-12-04 12:52   ` Geert Uytterhoeven
2024-12-04 17:14     ` Luca Ceresoli
2024-12-06  9:31   ` Luca Ceresoli
2025-02-12 15:33     ` Luca Ceresoli
2025-02-13  8:08       ` Saravana Kannan
2025-01-06 15:16 ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024110644-material-paternity-242f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=francesco.dolcini@toradex.com \
    --cc=geert@linux-m68k.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.