From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
Ming Lei <tom.leiming@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: Re: [PATCH][Alternative][RFC] PM / Runtime: Introduce driver runtime PM work routine
Date: Tue, 14 Aug 2012 00:06:37 +0200 [thread overview]
Message-ID: <201208140006.37977.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1208131737400.27622-100000@netrider.rowland.org>
On Monday, August 13, 2012, Alan Stern wrote:
> On Mon, 13 Aug 2012, Rafael J. Wysocki wrote:
>
> > > I guess the best we can say is that if you call pm_runtime_barrier()
> > > after updating the dev_pm_ops method pointers then after the barrier
> > > returns, the old method pointers will not be invoked and the old method
> > > routines will not be running. So we need an equivalent guarantee with
> > > regard to the pm_runtime_work pointer. (Yes, we could use a better
> > > name for that pointer.)
> > >
> > > Which means the code in the patch isn't quite right, because it saves
> > > the pm_runtime_work pointer before calling rpm_resume(). Maybe we
> > > should avoid looking at the pointer until rpm_resume() returns.
> >
> > Yes, we can do that.
> >
> > Alternatively, we can set power.work_in_progress before calling
> > rpm_resume(dev, 0) (i.e. regard the resume as a part of the work) to make
> > the barrier wait for all of it to complete.
>
> Yep, that would work. In fact, I did it that way in the proposed code
> posted earlier in this thread. (But that was just on general
> principles, not because I had this particular race in mind.)
OK
I need to prepare a new patch now, but first I'll send a couple of (minor)
fixes for the core runtime PM code.
Thanks,
Rafael
next prev parent reply other threads:[~2012-08-13 22:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 21:08 [PATCH][RFC] PM / Runtime: Introduce pm_runtime_get_and_call() Rafael J. Wysocki
2012-08-09 10:36 ` [PATCH][Update][RFC] " Rafael J. Wysocki
2012-08-09 20:42 ` [PATCH][Alternative][RFC] PM / Runtime: Introduce driver runtime PM work routine Rafael J. Wysocki
2012-08-12 16:43 ` Alan Stern
2012-08-12 22:21 ` Rafael J. Wysocki
2012-08-13 16:23 ` Alan Stern
2012-08-13 18:47 ` Rafael J. Wysocki
2012-08-13 19:20 ` Alan Stern
2012-08-13 19:56 ` Rafael J. Wysocki
2012-08-13 21:39 ` Alan Stern
2012-08-13 22:06 ` Rafael J. Wysocki [this message]
2012-08-14 23:15 ` [PATCH][RFC][Update] " Rafael J. Wysocki
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=201208140006.37977.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tom.leiming@gmail.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
Powered by JetHome