From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Saravana Kannan <saravanak@google.com>,
"Cc: Android Kernel" <kernel-team@android.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] driver core: Fix suspend/resume order issue with deferred probe
Date: Tue, 30 Jun 2020 17:38:50 +0200 [thread overview]
Message-ID: <20200630153850.GE1785141@kroah.com> (raw)
In-Reply-To: <CAJZ5v0joi2YDgAPrPhT8SMXTu-Va7s9DXVs7YDYf87JY_ntONQ@mail.gmail.com>
On Tue, Jun 30, 2020 at 03:50:58PM +0200, Rafael J. Wysocki wrote:
> On Fri, Jun 26, 2020 at 10:53 PM Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
> >
> > Hi Saravana,
> >
> > On Fri, Jun 26, 2020 at 10:34 PM Saravana Kannan <saravanak@google.com> wrote:
> > > On Fri, Jun 26, 2020 at 4:27 AM Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > > On Thu, Jun 25, 2020 at 7:52 PM Saravana Kannan <saravanak@google.com> wrote:
> > > > > On Thu, Jun 25, 2020 at 10:47 AM Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > > > > Note that deferred probing gets in the way here and so the problem is
> > > > > > related to it.
> > > > >
> > > > > I mean, we officially support deferred probing. Shouldn't we fix it so
> > > > > that it doesn't break suspend/resume?
> > > >
> > > > Yes, we should fix deferred probing.
> >
> > Please take into account that breakage is an actual regression.
> >
> > > > > Also, it's pretty easy to have
> > > > > cases where one module probes multiple device instances and loading it
> > > > > in one order would break dpm_list order for one device and loading it
> > > > > in another order would break it for another device. And there would be
> > > > > no "proper" order to load modules (because module order != device
> > > > > order).
> > > >
> > > > I'm not saying that the current code is perfect. I'm saying that the
> > > > fix as proposed adds too much cost for everybody who may not care IMO.
> > >
> > > Ok, how about I don't do this reordering until we see the first
> > > deferred probe request? Will that work for you? In that case, systems
> > > with no deferred probing will not incur any reordering cost. Or if
> > > reordering starts only towards the end, all the previous probes won't
> > > incur reordering cost.
> >
> > That first deferred probe request is more or less as of the first probe,
> > since commit 93d2e4322aa74c1a ("of: platform: Batch fwnode parsing when
> > adding all top level devices"), at least on DT systems.
>
> The deferred probe reordering of devices to the end of dpm_list
> started in 2012, so it is nothing new, and it demonstrably works for
> devices where the dependencies are known to the driver core.
>
> That said, in the cases when the dependencies are known to the driver
> core, it is also unnecessary to reorder dpm_list in
> deferred_probe_work_func(), because the right ordering of it is going
> to be determined elsewhere.
>
> Also commit 494fd7b7ad10 ("PM / core: fix deferred probe breaking
> suspend resume order") is not the source of the problem here, because
> the problem would have still been there without it, due to the
> device_pm_move_last() that was there before, so the Fixes: tag
> pointing to that commit is misleading.
>
> Now, because 716a7a259690 ("driver core: fw_devlink: Add support for
> batching fwnode parsing") is an optimization and the regression is
> present because of it AFAICS, the best way to address it at that point
> would be to revert commit 716a7a259690 for 5.8 and maybe do the
> optimization more carefully.
>
> Greg, what do you think?
I've been ignoreing this and letting you all sort it out :)
But if you think that patch should be reverted, I'll not object and will
be glad to to it if this solves the issue.
thanks,
greg k-h
next prev parent reply other threads:[~2020-06-30 15:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 3:24 [PATCH v1] driver core: Fix suspend/resume order issue with deferred probe Saravana Kannan
2020-06-25 8:57 ` Geert Uytterhoeven
2020-06-25 17:02 ` Saravana Kannan
2020-06-25 15:19 ` Rafael J. Wysocki
2020-06-25 16:48 ` Saravana Kannan
2020-06-25 16:58 ` Rafael J. Wysocki
2020-06-25 17:01 ` Saravana Kannan
2020-06-25 17:03 ` Rafael J. Wysocki
2020-06-25 17:08 ` Saravana Kannan
2020-06-25 17:46 ` Rafael J. Wysocki
2020-06-25 17:51 ` Saravana Kannan
2020-06-26 11:27 ` Rafael J. Wysocki
2020-06-26 20:34 ` Saravana Kannan
2020-06-26 20:53 ` Geert Uytterhoeven
2020-06-30 13:50 ` Rafael J. Wysocki
2020-06-30 15:38 ` Greg Kroah-Hartman [this message]
2020-06-30 16:11 ` Rafael J. Wysocki
2020-06-30 17:11 ` Saravana Kannan
2020-06-30 17:15 ` Rafael J. Wysocki
2020-07-10 13:21 ` Greg Kroah-Hartman
2020-07-10 20:47 ` Saravana Kannan
2020-07-01 11:07 ` Geert Uytterhoeven
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=20200630153850.GE1785141@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=geert@linux-m68k.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=saravanak@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox