From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: Linux-pm mailing list <linux-pm-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: Nested suspends; messages vs. states
Date: Thu, 24 Mar 2005 10:24:36 +1100 [thread overview]
Message-ID: <1111620276.16224.107.camel@gaston> (raw)
In-Reply-To: <200503231058.54311.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 4912 bytes --]
On Wed, 2005-03-23 at 10:58 -0800, David Brownell wrote:
> On Monday 21 March 2005 8:21 pm, Benjamin Herrenschmidt wrote:
> >
> > Yup, the model we are desinging now should allow for arbitrary
> > transitions I suppose as long as the target state is legal vs. the
> > dependencies.
>
> Leading to the question: how are the dependencies identified and
> enforced?
I have proposed something, if you read my other mails, that should deal
with most of the usual cases.
> My current thought is that it's wrong to expect the PM core code to
> do all this. Discussion on this list strongly suggests to me that
> we'll never achieve a Grand Unified Theory of PM into which every
> device, bus, platform, and board will fit ... unless we give up
> on the notion that _everything_ be centrally controlled. The key
> will be having good ways to delegate all the important issues.
The problem with your approach is since you have in mind those extremely
weird embedded setups that can't fit in any sane model, you decide to
reject any model that does anything useful at the core. I don't agree
with your logic. Most embedded systems even would fit in the simple
model. In the case of on-chip devices driven by clock nets, it's even
possible to just consider clock domains as "busses" and miracle ! we end
up with a nice discrete list of bus state to apply to drivers and
dependencies that fit the proposed model.
> So for example it would make sense to have device suspend() logic
> verify any dependencies for the target state, and then just fail
> cleanly if they're not satisfied.
How ? It doesn't have the necessary knowledge unless we start moving a
lot of burden into drivers. And every time we'll move some algorithmic
requirements like that to drivers, 99% of them will get it wrong.
> That'll mostly be an issue for bridge drivers ... like PCI
> bridges, host adapters for things like USB, hubs, and so on.
Bridges/busses have no knowledges of device states, they can't verify
dependencies unless the devices expose their state list & dependency
information in a meaningful way, which is exactly what I'm proposing.
> But it also shows a way to handle custom hardware, which may
> not be as regular as the PC and server centric developers want
> the world to be...
Yah, I know those, I have been doing embedded dev too, and in most
cases, they aren't _that_ bad. And if they are ? well, they'll hack
around like they do today.
> I'm happy with per-driver responsibilities. Less so with the notion
> of conflating power states and performance modes; they seem a bit more
> orthogonal to me.
They tend to be very tied in practice though ...
> On the other hand, I've also described the role of a driver suspend()
> call as just picking one of potentially many device power states that
> are compatible with the target (system) state, and I think there's
> common ground there. If the "very low" device power state is compatible,
> nobody should care ... because the request to the driver should have been
> "become compatible with this system power state", and only in unusual
> cases (sysfs requests) "go into this device power state".
>
> So, two types of request to drivers then. The main one would be to
> become compatible with a given system power state; flexible. The
> inflexible one would be to go into a specific device power state.
But a device power state has an impact on childs of this device, thus
the dependency issue. I am not talking about system states here. Unless
you want to completely phase out dyamic PM of busses...
> The handful of drivers that deal with dependencies can be responsible
> for that ordering. They should be able to delegate much of the work
> to PM core code (else why have a PM core?).
No, I don't agree. That would be huge code duplication with different
kinds of bugs in <name all busses in linux, and that is a LOT>
> I suspect that having all device states in some sort of order like that
> is a problem isomorphic with the Grand Unified Theory of PM, which I
> said we shouldn't try to derive.
Bla bla bla bla... I am NOT proposing a f*king Grand Unified Whatever,
I'm proposing a _model_ which should deal with a vast majority of issues
with a simple driver side API, period. I'm not trying to put in
everything nor all the crazy cases. It seems you are reasoning in an
all-or-nothing way, and since all is not desirable nor even possible in
a sane way, then you say, let's do nothing. I do NOT agree.
> If the drivers that deal with dependencies -- "bridge" drivers, for
> now -- can tell the PM core what to do with a given device (before
> me, after me, skip it) the PM core could just ask those bridge drivers
> to build a list, then walk the list issuing the right calls. Instead
> of having a single global list, build it on demand.
>
> - Dave
--
Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2005-03-23 23:24 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 20:11 Nested suspends; messages vs. states Alan Stern
[not found] ` <Pine.LNX.4.44L0.0503211436020.1241-100000-3WpdWqXrU/qjv4eRiOYp3g@public.gmane.org>
2005-03-21 20:20 ` Pavel Machek
[not found] ` <20050321202016.GI1390-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-21 21:14 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.0503211613010.2329-100000-3WpdWqXrU/qjv4eRiOYp3g@public.gmane.org>
2005-03-21 22:26 ` Pavel Machek
[not found] ` <20050321222609.GK1390-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-22 3:08 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.0503212140450.28689-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2005-03-22 11:08 ` Pavel Machek
[not found] ` <20050322110802.GA1751-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-22 17:24 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.0503221216430.954-100000-3WpdWqXrU/qjv4eRiOYp3g@public.gmane.org>
2005-03-23 23:49 ` Benjamin Herrenschmidt
2005-03-23 18:32 ` David Brownell
[not found] ` <200503231032.36164.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-23 21:00 ` Pavel Machek
2005-03-22 4:21 ` Benjamin Herrenschmidt
2005-03-22 17:04 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.0503221143460.954-100000-3WpdWqXrU/qjv4eRiOYp3g@public.gmane.org>
2005-03-22 23:36 ` Benjamin Herrenschmidt
2005-03-23 1:17 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503221709080.16154-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-23 19:02 ` David Brownell
[not found] ` <200503231102.27137.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-23 20:36 ` Nigel Cunningham
2005-03-23 21:08 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.0503231544550.631-100000-3WpdWqXrU/qjv4eRiOYp3g@public.gmane.org>
2005-03-24 2:35 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503231827310.15119-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 17:03 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.0503241149000.1345-100000-3WpdWqXrU/qjv4eRiOYp3g@public.gmane.org>
2005-03-24 17:13 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503240904570.13683-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 17:46 ` David Brownell
2005-03-24 17:51 ` Patrick Mochel
2005-03-24 19:27 ` Alan Stern
2005-03-23 18:58 ` David Brownell
[not found] ` <200503231058.54311.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-23 19:37 ` Jordan Crouse
[not found] ` <20050323123725.201d8a67-aftB2sG12IhaqnLngUycEA@public.gmane.org>
2005-03-24 5:16 ` David Brownell
2005-03-23 23:24 ` Benjamin Herrenschmidt [this message]
2005-03-24 2:45 ` David Brownell
[not found] ` <200503231845.55392.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-24 5:03 ` Benjamin Herrenschmidt
2005-03-24 5:27 ` David Brownell
[not found] ` <200503232127.19576.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-24 6:02 ` Benjamin Herrenschmidt
2005-03-24 6:31 ` David Brownell
[not found] ` <200503232231.00561.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-24 6:36 ` Benjamin Herrenschmidt
2005-03-24 7:46 ` David Brownell
2005-03-23 0:52 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503221635130.16154-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-23 1:21 ` Benjamin Herrenschmidt
2005-03-23 1:46 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503221724550.16154-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-23 3:31 ` Benjamin Herrenschmidt
2005-03-23 18:20 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503231008340.17099-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-23 21:02 ` Pavel Machek
[not found] ` <20050323210204.GE30704-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-23 21:35 ` Nigel Cunningham
[not found] ` <1111613750.14853.117.camel-r49W/1Cwd2ff0s6lnCXPX/uOuaPYTxhvJwvTLr3MMZM@public.gmane.org>
2005-03-23 21:54 ` Pavel Machek
[not found] ` <20050323215416.GK30704-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-24 2:40 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503231838570.15119-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 3:16 ` Nigel Cunningham
[not found] ` <1111634182.3430.1.camel-r49W/1Cwd2ff0s6lnCXPX/uOuaPYTxhvJwvTLr3MMZM@public.gmane.org>
2005-03-24 8:19 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503240017460.15119-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 10:01 ` CPU local things [was Re: Nested suspends; messages vs. states] Pavel Machek
[not found] ` <20050324100153.GE1354-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-24 15:59 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503240749030.24692-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 17:14 ` Nathan Lynch
2005-03-24 20:59 ` Nigel Cunningham
2005-03-23 23:14 ` Nested suspends; messages vs. states Benjamin Herrenschmidt
2005-03-24 1:27 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503231724100.15119-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 9:59 ` Pavel Machek
[not found] ` <20050324095910.GD1354-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-24 15:48 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503240746290.24692-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 16:38 ` David Brownell
[not found] ` <200503240838.37628.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-24 17:00 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503240858200.13683-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 17:33 ` David Brownell
[not found] ` <200503240933.49123.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-24 17:41 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503240937150.13683-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 18:08 ` David Brownell
2005-03-24 1:41 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503231727220.15119-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 2:22 ` Benjamin Herrenschmidt
2005-03-24 2:05 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503231742090.15119-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 2:29 ` Benjamin Herrenschmidt
2005-03-24 5:02 ` David Brownell
[not found] ` <200503232102.51132.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-24 5:14 ` Benjamin Herrenschmidt
2005-03-24 5:31 ` David Brownell
2005-03-24 8:16 ` Patrick Mochel
2005-03-23 19:06 ` David Brownell
[not found] ` <200503231106.03160.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2005-03-23 20:29 ` Nigel Cunningham
[not found] ` <1111609769.14853.104.camel-r49W/1Cwd2ff0s6lnCXPX/uOuaPYTxhvJwvTLr3MMZM@public.gmane.org>
2005-03-23 20:55 ` David Brownell
2005-03-23 21:18 ` Alan Stern
2005-03-24 2:13 ` Patrick Mochel
[not found] ` <Pine.LNX.4.50.0503231810400.15119-100000-x8k/2hhmB0w5etPau2IXcQ@public.gmane.org>
2005-03-24 2:52 ` 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=1111620276.16224.107.camel@gaston \
--to=benh-xvmvhmargas8u2djnn8i7kb+6bgklq7r@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=linux-pm-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
/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