From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Johannes Berg <johannes@sipsolutions.net>,
Pavel Machek <pavel@ucw.cz>,
Nigel Cunningham <nigel@nigel.suspend2.net>
Subject: Re: Re: [PATCH] swsusp: do not use pm_ops (was: Re: ...))
Date: Mon, 7 May 2007 14:43:16 -0700 [thread overview]
Message-ID: <200705071443.17429.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0705071426090.3429-100000@iolanthe.rowland.org>
On Monday 07 May 2007, Alan Stern wrote:
> On Sun, 6 May 2007, David Brownell wrote:
>
> > On Saturday 05 May 2007, Alan Stern wrote:
> >
> > > But who says that hibernate has to use "Non-Volatile Sleep" and normal
> > > shutdown has to use software-controlled "poweroff"? Why shouldn't the
> > > user be able to do it the other way 'round?
> >
> > Well, the definition of NVS matches hibernation, and
> > the definition of soft-off matches poweroff.
>
> Okay, I read sections 2.2 and 2.4 of the ACPI 3.0 spec. Here's the story
> in a nutshell:
>
> G3 = "mechanical off" = no wakeup devices are enabled,
> safe to disassemble
> G2/S5 = "soft off" = wakeup may be enabled, not safe to
> disassemble
> S4 = "non-volatile sleep" = hibernation, memory image is saved
> S5 = "soft off" = almost the same as S4 except there is no
> memory image
This summary suggests there are two S5 states, which I believe
is incorrect. G2 is just another name for S5. See Fig 3-1;
the ACPI 2.0 spec has the same figure.
Also, section 2.2 highlights that after S5 the OS restarts,
which it doesn't do from S4 (table 2-1) ... although when it
describes S4/NVS it fuzzes that issue by saying the key issue
is whether an NVS state file is found and used, not the level
of power available.
> The spec does not explicitly associate S4 with either G2 or G3, and in
> fact it contains language suggesting very strongly that the system could
> be in either one. The spec also uses the same name for G2 and for S5, no
> doubt leading to extra levels of confusion.
Figure 3-1 seemed quite explicit to me ... S4 is one of the G1
states, S5 is the only G2 state, and G3 is is a different beast.
Text elsewhere agrees with that.
What's confusing is how it describes NVS/hibernate. It's very
explicitly a G1 state. But leaving G2 or G3 can also trigger
a resume-from-NVS ... according to the text in 2.2 but not the
state diagrams, which don't show entering G3 even cleanly, much
less uncleanly (like a neighborhood power failure). Bleech.
I think the implication is that going to either G2 or G3 "off"
states discards something that a G1 state preserves. But I'd
have to search more deeply to see if that's clearly defined.
It's suggestive that there are no "_S5D" or "_S5W" methods;
such wake events would evidently be managed by BIOS not OSPM.
> So there's no question that S4 = NVS = hibernation. But hibernation
> can involve either G2 or G3.
I suspect there's a reason this part of ACPI is so vague;
it may relate to the desire to allow direct BIOS handling
of the NVS state.
> And there's no question (in my mind at least) that normal shutdown should
> be able to involve either G2/S5 or G3.
G2/S5, yes ... that can be entered under software control.
But by definition, not G3 since it requires a mechanical/manual
power switch update. ("Mechanical OFF", or in the spec's example
"movement of a large red switch".)
> So although the spec doesn't put
> things quite this way, we could say:
>
> hibernation = S4 = G2/S4 or G3/S4,
>
> shutdown = S5 = G2/S5 or G3/S5.
No, you're missing the key "mechanical" red-switch-ish step in G3.
G3 *can't* be entered under software control. By definition. It's
there for among other things regulatory reasons ... the only power
consumed in G3 is from the on-board RTC battery.
> > > > That's a different suggestion, yes. I'm not sure I see any
> > > > benefit of that flexibility for "soft off" states though,
> > > > especially if it made "off" consume more power.
> > >
> > > The benefit is that it allows more devices to function as wakeup sources,
> > > right?
> >
> > With downsides of "more power consumed during 'off' states"
> > and "invalidating documentation, training, and expectations".
>
> Okay, let's clear up the confusion. The additional flexibility I'm
> suggesting for "soft off" = G2 states is that we should allow both G2/S4
> and G2/S5. They would consume the same amount of power since they are
> both G2 states; the difference is that G2/S4 involves saving and restoring
> a memory image and G2/S5 does not.
There is no G2/S4 state; it's G1/S4 or G2/S5. And S5 does not
involve an NVS file, or it'd be S4. The ACPI spec is sadly
vague in those areas, however.
- Dave
next prev parent reply other threads:[~2007-05-07 21:43 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070425072350.GA6866@ucw.cz>
[not found] ` <Pine.LNX.4.64.0704251239110.8406@vaio.localdomain>
[not found] ` <alpine.LFD.0.98.0704251252070.9964@woody.linux-foundation.org>
[not found] ` <20070425202741.GC17387@elf.ucw.cz>
[not found] ` <alpine.LFD.0.98.0704251332090.9964@woody.linux-foundation.org>
[not found] ` <20070425214420.GG17387@elf.ucw.cz>
[not found] ` <alpine.LFD.0.98.0704251515140.9964@woody.linux-foundation.org>
[not found] ` <1177540027.5025.87.camel@nigel.suspend2.net>
[not found] ` <alpine.LFD.0.98.0704251550210.9964@woody.linux-foundation.org>
[not found] ` <1177583998.6814.42.camel@johannes.berg>
[not found] ` <20070426113005.GU17387@elf.ucw.cz>
2007-04-26 16:31 ` suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy) Johannes Berg
2007-04-26 18:40 ` Rafael J. Wysocki
2007-04-26 18:40 ` Johannes Berg
[not found] ` <1177612802.6814.121.camel@johannes.berg>
2007-04-26 19:02 ` Rafael J. Wysocki
[not found] ` <200704262102.38568.rjw@sisk.pl>
2007-04-27 9:41 ` Johannes Berg
[not found] ` <1177666915.7828.35.camel@johannes.berg>
2007-04-27 10:09 ` Johannes Berg
2007-04-27 10:18 ` Rafael J. Wysocki
[not found] ` <200704271218.07120.rjw@sisk.pl>
2007-04-27 10:19 ` Johannes Berg
[not found] ` <1177669179.7828.53.camel@johannes.berg>
[not found] ` <200704271409.56687.rjw@sisk.pl>
2007-04-27 12:07 ` Johannes Berg
2007-04-27 12:09 ` Rafael J. Wysocki
2007-04-29 12:48 ` [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) R. J. Wysocki
2007-04-29 12:53 ` Rafael J. Wysocki
2007-04-30 8:29 ` Johannes Berg
2007-04-30 14:51 ` Rafael J. Wysocki
2007-04-30 14:59 ` Johannes Berg
2007-05-01 14:05 ` Rafael J. Wysocki
2007-05-01 22:02 ` Rafael J. Wysocki
2007-05-02 5:13 ` Alexey Starikovskiy
2007-05-02 13:42 ` Rafael J. Wysocki
2007-05-02 14:11 ` Alexey Starikovskiy
2007-05-02 19:26 ` ACPI code in platform mode hibernation code paths (was: Re: [PATCH] swsusp: do not use pm_ops) Rafael J. Wysocki
[not found] ` <200705022126.47897.rjw@sisk.pl>
2007-05-03 22:48 ` Pavel Machek
[not found] ` <20070503224807.GD13426@elf.ucw.cz>
2007-05-03 23:14 ` Rafael J. Wysocki
2007-05-04 10:54 ` Johannes Berg
[not found] ` <1178276072.7408.7.camel@johannes.berg>
2007-05-04 12:08 ` Pavel Machek
[not found] ` <20070504120802.GF13426@elf.ucw.cz>
2007-05-04 12:29 ` Rafael J. Wysocki
2007-05-02 8:21 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) Johannes Berg
2007-05-02 9:02 ` Rafael J. Wysocki
2007-05-02 9:16 ` Pavel Machek
2007-05-02 9:25 ` Johannes Berg
2007-05-03 14:00 ` Alan Stern
2007-05-03 17:17 ` Rafael J. Wysocki
2007-05-03 18:33 ` Alan Stern
2007-05-03 19:47 ` Rafael J. Wysocki
2007-05-03 19:59 ` Alan Stern
2007-05-03 20:21 ` Rafael J. Wysocki
2007-05-04 14:40 ` Alan Stern
2007-05-04 20:20 ` Rafael J. Wysocki
2007-05-04 20:21 ` Johannes Berg
2007-05-04 20:55 ` Pavel Machek
2007-05-04 21:08 ` Johannes Berg
2007-05-04 21:15 ` Pavel Machek
2007-05-04 21:53 ` Rafael J. Wysocki
2007-05-04 21:53 ` Johannes Berg
2007-05-04 22:25 ` Rafael J. Wysocki
2007-05-05 15:52 ` Alan Stern
2007-05-07 1:16 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: ...) David Brownell
2007-05-07 21:00 ` Rafael J. Wysocki
2007-05-07 21:45 ` David Brownell
2007-05-07 22:16 ` Rafael J. Wysocki
2007-05-09 19:23 ` David Brownell
2007-05-04 21:06 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) Rafael J. Wysocki
2007-05-04 20:58 ` Pavel Machek
2007-05-04 21:24 ` Rafael J. Wysocki
2007-05-05 16:19 ` Alan Stern
2007-05-05 17:46 ` Rafael J. Wysocki
2007-05-05 21:42 ` Alan Stern
2007-05-05 22:14 ` Rafael J. Wysocki
2007-05-04 21:40 ` David Brownell
2007-05-04 22:19 ` Rafael J. Wysocki
2007-05-07 1:05 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: ...)) David Brownell
2007-05-05 16:08 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) Alan Stern
2007-05-05 17:50 ` Rafael J. Wysocki
2007-05-05 21:43 ` Alan Stern
2007-05-05 22:16 ` Rafael J. Wysocki
2007-05-07 1:31 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: ...) David Brownell
2007-05-07 16:33 ` Alan Stern
2007-05-07 20:49 ` Pavel Machek
2007-05-07 21:38 ` Alan Stern
2007-05-08 0:30 ` Pavel Machek
2007-05-03 20:33 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) David Brownell
2007-05-03 20:33 ` David Brownell
2007-05-03 20:51 ` Rafael J. Wysocki
2007-05-04 14:51 ` Alan Stern
2007-05-04 14:56 ` Johannes Berg
2007-05-04 20:27 ` Rafael J. Wysocki
2007-05-04 22:00 ` David Brownell
2007-05-05 15:49 ` Alan Stern
2007-05-07 1:10 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: ...)) David Brownell
2007-05-07 18:46 ` Alan Stern
2007-05-07 21:29 ` Rafael J. Wysocki
2007-05-07 22:22 ` Alan Stern
2007-05-07 22:47 ` Rafael J. Wysocki
2007-05-08 14:56 ` Alan Stern
2007-05-08 19:59 ` Rafael J. Wysocki
2007-05-08 21:26 ` Alan Stern
2007-05-09 8:17 ` Pavel Machek
2007-05-09 15:21 ` Alan Stern
2007-05-09 19:35 ` David Brownell
2007-05-09 20:04 ` Alan Stern
2007-05-09 20:21 ` David Brownell
2007-05-10 15:17 ` Alan Stern
2007-05-09 21:07 ` Pavel Machek
2007-05-07 21:43 ` David Brownell [this message]
2007-05-07 22:41 ` Alan Stern
2007-05-03 22:18 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) Pavel Machek
2007-05-04 14:57 ` Alan Stern
2007-05-04 20:50 ` Rafael J. Wysocki
2007-05-04 20:49 ` Johannes Berg
2007-05-04 21:11 ` Rafael J. Wysocki
2007-05-04 21:23 ` Johannes Berg
2007-05-04 21:55 ` Rafael J. Wysocki
2007-05-04 21:54 ` Johannes Berg
2007-05-04 22:21 ` Rafael J. Wysocki
2007-05-05 15:37 ` Alan Stern
2007-05-05 18:49 ` Rafael J. Wysocki
2007-05-05 21:44 ` Alan Stern
2007-05-05 22:36 ` Rafael J. Wysocki
2007-05-06 22:01 ` Alan Stern
2007-05-06 22:31 ` Rafael J. Wysocki
2007-05-07 1:37 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: ..) David Brownell
2007-05-08 2:57 ` Greg KH
2007-05-07 8:51 ` Re: [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) Johannes Berg
2007-05-04 22:12 ` David Brownell
2007-05-04 22:31 ` Rafael J. Wysocki
2007-05-05 16:15 ` Alan Stern
2007-05-02 13:43 ` 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=200705071443.17429.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=johannes@sipsolutions.net \
--cc=linux-pm@lists.linux-foundation.org \
--cc=nigel@nigel.suspend2.net \
--cc=pavel@ucw.cz \
--cc=penberg@cs.helsinki.fi \
--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