public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Brownell <david-b@pacbell.net>
Cc: Oliver Neukum <oliver@neukum.org>, Pavel Machek <pavel@suse.cz>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Patrick Mochel <mochel@digitalimplant.org>
Subject: Re: Solving suspend-level confusion
Date: Sun, 01 Aug 2004 11:34:36 +1000	[thread overview]
Message-ID: <1091324075.7389.41.camel@gaston> (raw)
In-Reply-To: <200407311741.12406.david-b@pacbell.net>

On Sun, 2004-08-01 at 10:41, David Brownell wrote:
> On Saturday 31 July 2004 10:01, Oliver Neukum wrote:
> > 
> > Maybe a better approach would be to describe the required features to
> > the drivers rather than encoding them in a single integer. Rather
> > like passing a request that states "lowest power level with device state
> > retained, must not do DMA, enable remote wake up"
> 
> A pointer to some sort of struct could be generic and typesafe;
> better than an integer or enum.

Well... if it gets that complicated, drivers will get it wrong...

I'm pretty sure that in real life, drivers only care about 2 states
at this point, which is the ones needed for suspend to disk and suspend
to RAM, the later doing a D3. An assitional "standby" state could be
added later if we want.

If we really want to separate the system "target" state from the device
state, then we could indeed define a structure, but I doubt this is necessary,
I think we can get everything working with the current scheme by just slightly
adjusting the constants to properly differenciate the 2 above defined system
states.

The only thing we need to make sure of at this point is that drivers ignore
states they don't understand so we keep some flexibility to extending the list
of states.

Part of the confusion at this point is that we are playing with 2 different
concepts, which are the driver operating state and the device power state.

System suspend wants all drivers to suspend (freeze activity so that a
consistent state of the driver is kept in memory). It may or may not
be followed by a device power down.

Dynamic per-device power management would alter the device power state,
but without putting the driver into a suspended state (actually, the driver
itself would be responsible to turning the device back on as soon as some kind
of request comes in).

I think we don't need at this point to provide hooks or abstractions to
represent these. Doing so would break everything, we don't need to do it
at this point, we can at least get something reasonably working with our
current scheme. The device power state policy can remain under driver
control imho and don't need to be abstracted. At least not now. Let's get
things working with what we have, for system suspend, and drivers who want
to do dynamic PM can implement it locally.

Ben.



  reply	other threads:[~2004-08-01  1:37 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-30 16:44 Solving suspend-level confusion Pavel Machek
2004-07-30 22:39 ` Benjamin Herrenschmidt
2004-07-30 23:06   ` Pavel Machek
2004-07-31  4:02 ` David Brownell
2004-07-31  4:36   ` Pavel Machek
2004-07-31  5:49   ` Benjamin Herrenschmidt
2004-07-31 14:23     ` David Brownell
2004-07-31 17:01       ` Oliver Neukum
2004-07-31 17:51         ` David Brownell
2004-08-01  0:41         ` David Brownell
2004-08-01  1:34           ` Benjamin Herrenschmidt [this message]
2004-08-02 16:38             ` David Brownell
2004-08-03  0:38               ` Benjamin Herrenschmidt
2004-08-04  2:28                 ` David Brownell
2004-08-04  2:26                   ` Nigel Cunningham
2004-08-04  2:53                     ` Benjamin Herrenschmidt
2004-08-04  2:52                       ` Nigel Cunningham
2004-08-04  4:14                         ` Benjamin Herrenschmidt
2004-08-04  4:25                           ` Nigel Cunningham
2004-08-04  4:52                             ` Benjamin Herrenschmidt
2004-08-04  4:54                               ` Nigel Cunningham
2004-08-04  5:03                                 ` Benjamin Herrenschmidt
2004-08-04  5:05                                   ` Nigel Cunningham
2004-08-05 10:05                                   ` Nigel Cunningham
2004-08-05 22:31                                   ` Nigel Cunningham
2004-08-06  0:39                                     ` Benjamin Herrenschmidt
2004-08-06 21:30                                     ` Pavel Machek
2004-08-06 21:29                           ` Pavel Machek
2004-08-06 22:27                             ` Benjamin Herrenschmidt
2004-08-06 22:37                               ` Pavel Machek
2004-08-06 21:26                         ` Pavel Machek
2004-08-05  1:29                     ` David Brownell
2004-08-05 10:19                       ` Nigel Cunningham
2004-08-06  0:32                         ` David Brownell
     [not found]                           ` <1091772799.2532.50.camel@laptop.cunninghams>
2004-08-07 22:24                             ` David Brownell
2004-08-04  2:56                   ` Benjamin Herrenschmidt
2004-08-04  3:30                     ` David Brownell
2004-08-04  4:19                       ` Benjamin Herrenschmidt
2004-08-04  4:47                       ` What PM should be and do (Was Re: Solving suspend-level confusion) Nigel Cunningham
2004-08-04  4:53                         ` Benjamin Herrenschmidt
2004-08-04  4:59                           ` Nigel Cunningham
2004-08-08 16:54                             ` Pavel Machek
2004-08-08 21:55                               ` Nigel Cunningham
2004-08-09  8:42                                 ` Pavel Machek
2004-08-05 18:19                         ` Greg KH
2004-08-05 22:14                           ` Nigel Cunningham
2004-08-07  0:08                             `  Éric Brunet
2004-08-08 19:48                               ` Pavel Machek
2004-08-11 21:23                             ` Greg KH
2004-08-08  0:54                         ` David Brownell
2004-08-06 21:21               ` Solving suspend-level confusion Pavel Machek
2004-07-31 21:09       ` Benjamin Herrenschmidt
2004-08-02 16:40         ` David Brownell
2004-08-03  0:50           ` Benjamin Herrenschmidt
2004-08-07 23:30             ` David Brownell
2004-08-06 21:10           ` Pavel Machek
2004-08-07 23:23             ` David Brownell
2004-08-08 17:16               ` Pavel Machek
2004-08-06 20:04       ` Pavel Machek
2004-08-07 22:14         ` David Brownell
2004-08-07 23:53           ` Benjamin Herrenschmidt

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=1091324075.7389.41.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@digitalimplant.org \
    --cc=oliver@neukum.org \
    --cc=pavel@suse.cz \
    /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