[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4548634.pC6GYZYGWm@vostro.rjw.lan>
Date: Thu, 17 Sep 2015 02:07:48 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Grygorii Strashko <grygorii.strashko@...com>,
Thierry Reding <thierry.reding@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] driver core: Ensure proper suspend/resume ordering
On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote:
> On Wed, 16 Sep 2015, Grygorii Strashko wrote:
>
> > I think, It should prohibited to probe devices during suspend/hibernation.
> > And solution introduced in this patch might help to fix it -
> > in general, we could do :
> > - add sync point on suspend enter: wait_for_device_probe() and
> > - prohibit probing: move all devices which will request probing into
> > deferred_probe list
> > - one suspend exit: allow probing and do driver_deferred_probe_trigger
>
> That could work; it's a good idea.
>
> > I'd like to mention here that this patch will work only
> > if dmp_list will be filled according device creation order ("parent<-child" dependencies)
> > *AND* according device's probing order ("supplier<-consumer").
> > So, if there is the case when Parent device can be probed AFTER its children
> > - it will not work, because "parent<-child" dependencies will not be tracked
> > any more :( Sry, I could not even imagine that such crazy case exist :'(
>
> If we avoid moving devices to the end of the dpm_list when they already
> have children, then we should be okay, right?
>
> > Are there any other subsystems with the same behavior like PCI?
>
> I don't know.
>
> > If not - probably, it could be fixed in PCI subsystem using device_pm_move_after() or
> > device_move() in PCIe ports probe.
> > if yes - ... maybe we can scan/re-check and reorder dpm_list on suspend enter and
> > restore ("parent<-child" dependencies).
>
> > Truth is that smth. need to be done 100%. Personally, I was hit by this issue also,
> > and it cost me 3 hours of debugging and I came up with the same patch as
> > Bill Huang, then spent some time trying to understand what is wrong with PCI
> > - finally, I've just changed the order of my devices in DT :)
> >
> > Also, I think, it will be good to have this patch in -next to collect more feedbacks.
>
> I like the idea of forcing all probes during a sleep transition to be
> deferred. We could carry them out just before unfreezing the user
> threads. That combined with the change mentioned above ought to be
> worth testing.
Agreed.
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists