public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk@arm.linux.org.uk>, Pavel Machek <pavel@suse.cz>,
	Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Patrick Mochel <mochel@osdl.org>
Subject: Re: Fix up power managment in 2.6
Date: Wed, 03 Sep 2003 15:31:14 +0200	[thread overview]
Message-ID: <1062595873.1785.23.camel@gaston> (raw)
In-Reply-To: <1062594137.19058.23.camel@dhcp23.swansea.linux.org.uk>

On Wed, 2003-09-03 at 15:02, Alan Cox wrote:
> On Maw, 2003-09-02 at 11:21, Benjamin Herrenschmidt wrote:
> > The whole point was to get rid of the old 2 step save_state, then
> > suspend model which didn't make sense. A saved state is only meaningful
> > as long as that state doesn't get modified afterward, so saving state
> > and suspending are an atomic operation.
> 
> Very old myth. In fact just about every scheduler on the planet exploits
> the fact this is untrue.
> 
> 		save state
> 		continue running doing scheduler stuff
> 		restore other state losing the state in the middle we dont need
> 
> Ditto with a lot of I/O devices. My audio save state and suspend can be
> seperated - I might play a little bit of a song twice but is that a bug

It is in lots of case with IO. Especially if your state don't match
between different devices that rely on each other (parent/child
typically), or if some of that state information matches something
persistent on the HW (devices don't necessarily get fully powered
off during suspend).

Note that in most case, there isn't really a notion of "state" to
store or save anyway, that is "state" is just whatever is in your
net_device structure for a network driver, or whatever private
structure in your whatever-other driver, so you just have to restore
a couple of things on wakeup, but really nothing to save on suspend.

The single callback is much simpler, and will avoid lots of mistakes
imho.

Ben.



  reply	other threads:[~2003-09-03 13:31 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-31 23:28 Fix up power managment in 2.6 Pavel Machek
2003-09-01  6:57 ` Russell King
2003-09-01  8:11   ` Pavel Machek
2003-09-01  8:26     ` Russell King
2003-09-01  9:33       ` Pavel Machek
2003-09-01 16:28 ` Linus Torvalds
2003-09-01 21:12   ` Pavel Machek
2003-09-01 21:52     ` Russell King
2003-09-01 22:19       ` Pavel Machek
2003-09-01 22:30         ` Russell King
2003-09-01 22:40           ` Pavel Machek
2003-09-01 22:48             ` Russell King
2003-09-02 17:17             ` Greg KH
2003-09-03 15:13               ` Pavel Machek
2003-09-02 10:21           ` Benjamin Herrenschmidt
2003-09-03 13:02             ` Alan Cox
2003-09-03 13:31               ` Benjamin Herrenschmidt [this message]
2003-09-03 17:08               ` Pavel Machek
2003-09-05 20:42             ` Pavel Machek
2003-09-01 22:55     ` Patrick Mochel
2003-09-01 23:38       ` Pavel Machek
2003-09-02  0:52         ` Patrick Mochel
2003-09-02  9:02           ` Pavel Machek
2003-09-02  9:47           ` Pavel Machek
2003-09-02 16:11             ` Patrick Mochel
2003-09-03 16:21               ` Pavel Machek
2003-09-03 23:17                 ` Patrick Mochel
2003-09-03 17:49               ` Pavel Machek
2003-09-03 17:59                 ` bill davidsen
2003-09-03 23:20                 ` Patrick Mochel
2003-09-05  9:33                   ` Pavel Machek
2003-09-03 20:03               ` Bill Davidsen
2003-09-03 22:14                 ` Pavel Machek
2003-09-04  4:06                   ` Bill Davidsen
2003-09-04 14:52                     ` Patrick Mochel
2003-09-02 10:29       ` Jan Rychter
2003-09-05  5:58       ` Rob Landley
2003-09-05 10:26         ` Pavel Machek
2003-09-05 10:56           ` Michael Frank
2003-09-05 11:08             ` Pavel Machek
2003-09-05 11:51               ` Michael Frank
2003-09-05 12:01                 ` Pavel Machek
2003-09-05 17:47         ` Patrick Mochel
2003-09-05 18:02           ` Jeff Garzik
2003-09-05 18:13             ` Patrick Mochel
2003-09-05 21:46               ` Jeff Garzik
2003-09-05 18:57             ` Rob Landley
2003-09-05 19:06               ` Pavel Machek
2003-09-05 20:09                 ` Keyboard stuff (was Re: Fix up power managment in 2.6) Rob Landley
2003-09-05 20:31                   ` Pavel Machek
2003-09-05 20:01             ` Fix up power managment in 2.6 Richard A Nelson
2003-09-05 21:45               ` Jeff Garzik
2003-09-05 18:49           ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2003-09-05 20:13 Nicolas Mailhot

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=1062595873.1785.23.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    --cc=pavel@suse.cz \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@osdl.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