Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1518649

Re: [PATCH v3] PM / sleep: don't suspend parent when async child suspend_{noirq,late} fails

From Brian Norris <briannorris@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3] PM / sleep: don't suspend parent when async child suspend_{noirq,late} fails
Date 2016-11-10 03:10 +0100
Message-ID <sBMYp-7B7-9@gated-at.bofh.it> (permalink)
References <swVpD-49R-19@gated-at.bofh.it> <sBMlI-77l-13@gated-at.bofh.it> <sBMOJ-7gR-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Nov 10, 2016 at 02:53:20AM +0100, Rafael J. Wysocki wrote:
> On Thu, Nov 10, 2016 at 2:21 AM, Brian Norris <briannorris@chromium.org> wrote:
> > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > index c58563581345..57a8ca4bc8ab 100644
> > --- a/drivers/base/power/main.c
> > +++ b/drivers/base/power/main.c
> > @@ -1027,6 +1027,8 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a
> >         TRACE_DEVICE(dev);
> >         TRACE_SUSPEND(0);
> >
> > +       dpm_wait_for_children(dev, async);
> > +
> 
> On a second thought. I'd move the
> 
> if (dev->power.syscore || dev->power.direct_complete)
> 
> along with this (and put it in front), because those flags won't
> change while children are being waited on anyway.

I can do that, but is it really necessary? It's also not the order we do
it for __device_suspend(). I don't like arbitrarily making optimizations
in this code differently to the non-{noirq,late} versions.

Also, would it cause any problem to have a parent return success before
its children have suspended? I haven't reasoned through all the cases
there, but I wouldn't do that without reason.

Brian

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 2/2] PM / sleep: don't suspend parent when async child suspend_{noirq,late} fails Brian Norris <briannorris@chromium.org> - 2016-10-27 18:10 +0200
  Re: [PATCH v2 2/2] PM / sleep: don't suspend parent when async child suspend_{noirq,late} fails "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-11-01 05:20 +0100
    Re: [PATCH v2 2/2] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails Brian Norris <briannorris@chromium.org> - 2016-11-01 06:30 +0100
    Re: [PATCH v2 2/2] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-11-01 07:10 +0100
      Re: [PATCH v2 2/2] PM / sleep: don't suspend parent when async child suspend_{noirq,late} fails "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-11-02 04:50 +0100
        Re: [PATCH v2 2/2] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails Brian Norris <briannorris@chromium.org> - 2016-11-02 06:10 +0100
          Re: [PATCH v2 2/2] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails "Rafael J. Wysocki" <rafael@kernel.org> - 2016-11-10 01:10 +0100
            Re: [PATCH v2 2/2] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails Brian Norris <briannorris@chromium.org> - 2016-11-10 01:20 +0100
  [PATCH v3] PM / sleep: don't suspend parent when async child suspend_{noirq,late} fails Brian Norris <briannorris@chromium.org> - 2016-11-10 02:30 +0100
    Re: [PATCH v3] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails "Rafael J. Wysocki" <rafael@kernel.org> - 2016-11-10 03:00 +0100
      Re: [PATCH v3] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails Brian Norris <briannorris@chromium.org> - 2016-11-10 03:10 +0100
        Re: [PATCH v3] PM / sleep: don't suspend parent when async child  suspend_{noirq,late} fails "Rafael J. Wysocki" <rafael@kernel.org> - 2016-11-11 02:50 +0100

csiph-web