From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@lists.osdl.org
Subject: Re: RFC -- updated Documentation/power/devices.txt
Date: Mon, 24 Jul 2006 14:19:25 -0700 [thread overview]
Message-ID: <200607241419.25976.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0607241610240.6386-100000@iolanthe.rowland.org>
On Monday 24 July 2006 1:44 pm, Alan Stern wrote:
> Is it too early to start thinking about replacements for .../power/state
> in individual subsystems?
I don't think so. You had one for USB, but Greg didn't want to merge it yet.
So far as I know, there is no current valid use of the .../power/state files.
If I'm missing something, that patch to make it into a (deprecated) config
option will help us learn some interesting things.
> Is that attribute file currently used anywhere
> outside of PCMCIA (other than for testing)? The sooner a safe replacement
> is provided for such uses, the better.
I think PCMCIA switched over to /sys/class/pcmcia_socket/.../card_pm_state
a while back, though I'm not sure about the userspace tools. They could be
behind the times by a bit.
> > Once the sysfs mechanism goes away, there won't be much need for the mechanism.
> > Only callers to dpm_runtime_*() would trigger any of the troublesome paths.
> > The two callers are USB and PCMCIA, and I'm not sure they really need the extra
> > lock that's grabbed by the dpm_runtime_*() calls if there's no need to protect
> > against that sysfs mechanism.
>
> My autosuspend patches remove the dpm_runtime_* stuff from USB, leaving
> only PCMCIA.
Good, I was going to ask about that, except that I figured reading the
patches would answer the question in a better way ... ;)
I have a patch that deprecates the dpm_runtime_*() calls; it's only triggered
by USB and PCMCIA. Not worth submitting IMO; fix the code first, then just
remove those calls since /sys/.../power/state will be the only remaining caller.
> The "extra lock" you refer to is dpm_sem? I'm not quite sure why it's
> there at all... Apparently all it does is attempt to prevent runtime PM
> requests from being made while a system suspend/resume transition is in
> progress. But it's futile to try doing this from within the core, if
> drivers are going to be managing device states internally. (Not to
> mention that a task waiting on dpm_sem will cause the "freeze processes"
> procedure to fail.)
I thought dpm_sem was to protect the list manipulations that are currently
substituting for a more dynamic tree traversal mechanism. (But haven't
actually looked recently...)
> And it's not clear that we _do_ want to prevent runtime PM changes from
> occurring during a system sleep transition.
Real runtime PM changes, of the type the core doesn't see or care about?
Of course not. But the fake ones via sysfs? Yes, I think we do. We
don't want those happening in any case.
> If a remote-wakeup request
> arrives while the system is suspending, it ought to be legal for the
> request to succeed and thereby abort the transition.
Agreed. Not that we'd always want to do it quite that way (surely some
hardware will cause pain!), but it should certainly be a works-well option.
- Dave
next prev parent reply other threads:[~2006-07-24 21:19 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 22:25 RFC -- updated Documentation/power/devices.txt David Brownell
2006-07-11 5:56 ` Andrew Morton
2006-07-11 16:38 ` David Brownell
2006-07-11 21:57 ` David Brownell
2006-07-12 12:25 ` Pavel Machek
2006-07-12 14:04 ` Alan Stern
2006-07-12 15:45 ` David Brownell
2006-07-12 16:03 ` Alan Stern
2006-07-23 1:37 ` David Brownell
2006-07-23 3:59 ` Alan Stern
2006-07-23 10:50 ` Rafael J. Wysocki
2006-07-23 13:03 ` Alan Stern
2006-07-23 22:45 ` Rafael J. Wysocki
2006-07-24 3:22 ` David Brownell
2006-07-24 9:46 ` Rafael J. Wysocki
2006-07-24 14:51 ` Alan Stern
2006-07-24 15:15 ` David Brownell
2006-07-24 15:42 ` Alan Stern
2006-07-24 17:11 ` David Brownell
2006-07-24 20:44 ` Alan Stern
2006-07-24 21:19 ` David Brownell [this message]
2006-07-25 15:42 ` Alan Stern
2006-08-10 23:38 ` [patch 2.6.18-rc] " David Brownell
2006-07-23 16:22 ` RFC -- " David Brownell
2006-07-11 14:40 ` Pavel Machek
2006-07-11 21:28 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2006-07-11 7:56 Woodruff, Richard
2006-07-11 16:51 ` David Brownell
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=200607241419.25976.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-pm@lists.osdl.org \
--cc=stern@rowland.harvard.edu \
/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