public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Flames over -- Re: Which is simpler?
@ 2006-02-13 19:16 David Brownell
  2006-02-13 20:08 ` Phillip Susi
  0 siblings, 1 reply; 78+ messages in thread
From: David Brownell @ 2006-02-13 19:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: psusi

I think "simpler" isn't the issue; "swsusp" is a kind of checkpoint
even in its ACPI versions, while standby/str modes are substantially
different beasts.

True standby/suspend modes are classic "power management" things:
part of the system stay in low power modes (not necessarily "off")
to reduce power consumption, while other parts are in active use.
The more deeply they're suspended, the less the system looks like
"idle" and the more it looks like "suspend-to-ram".


Phillip Susi wrote:
> 	Thus when suspended to ram, 
> typically your usb hard drive and almost allways your ide/sata/scsi 
> drive will be completely powered off. 

What ide drive?  Oh, you're talking about PC-ish systems, not
embedded ones that don't _have_ rotating media to power off.

Your experience is very different from mine; I've observed that
most PC hardware keeps USB powered in suspend-to-ram states, so
a keyboard or mouse action may wake the system up, just as it can
with many PS2 style keyboards and mice.  Same thing for Ethernet,
using various types of wakeup event including "magic packet".
See /proc/acpi/wakeup, and the related parts of the ACPI specs.
(And USB specs, and lots more ... this info is widespread.)

At the PCI hardware level, that basically means staying in
what's called a D3hot state:  controller maintains power, and
might be a wakeup event source.  If you read the EHCI spec
you'll notice careful specification of how to maintain USB
connections by providing only minimal VBUS current using the
Vaux supply ... not all boards go that extra distance for
power savings, maintaining USB state (and allowing wakeup)
using a lower power D3cold state (with ACPI S3) not D3hot.

(And there's gobs of "legacy" PCI PM hardware still being
manufactured, using out-of-band signaling rather than the
standardized PCI PM stuff.  For that, see the relevant USB
controller specs ... e.g. OHCI, Intel UHCI, VIA UHCI.)

For non-PCI hardware, that's actually a system option.  Most
systems have many low power modes, including ones where it'd
make sense to support wakeup from USB and ones where it would
not; external transceivers seem to give the most flexibility.

You should also remember a useful point from the ACPI spec:
if you're taking the system apart with a screwdriver, then
you've gone out-of-spec.  So swapping IDE drives is strongly
in the "user error" category ... unlike swapping USB drives,
which is equally strongly in the "normal operation" category.
(So it would be an error if Linux didn't properly detect when
users unplug all usb devices after putting their laptops into
STR and before carrying them someplace else...)


> Then your motherboard keeps the bus in a lower power state such that it 
> is capable of causing a wake event when state changes.  I'm also fairly 
> sure that when such a wake event happens, there is no indication to the 
> kernel about why it was woken up. 

Read about the #PME signal status in the PCI PM capabilities.

And the USB remote wakeup reporting done by USB hubs; you can
even look at the drivers/usb/core/hub.c code and see how usb
wakeup events (of various types) are handled.

You don't seem to know what you're talking about here.


> 	 As I said before, once woken up, 
> the kernel must probe all hardware and if there is a new device, it will 
> find it.  The hardware only detected that something changed and thus, 
> generated a wake even, it did not notice exactly what that change was 
> and inform the kernel. 

You were wrong then too... both about probing "all hardware" and about not
being able to distinguish wakeup event sources.  

- Dave

^ permalink raw reply	[flat|nested] 78+ messages in thread
* Re: Flames over -- Re: Which is simpler?
@ 2006-02-12 16:57 Alan Stern
  2006-02-13  0:51 ` Phillip Susi
  0 siblings, 1 reply; 78+ messages in thread
From: Alan Stern @ 2006-02-12 16:57 UTC (permalink / raw)
  To: Kyle Moffett, Alon Bar-Lev; +Cc: Kernel development list

Both of you are missing an important difference between Suspend-to-RAM and 
Suspend-to-Disk.

Suspend-to-RAM is a true suspend operation, in that the hardware's state
is maintained _in the hardware_.  External buses like USB will retain
suspend power, for instance (assuming the motherboard supports it; some
don't).

Suspend-to-Disk, by contrast, is _not_ a true suspend.  It can more 
accurately be described as checkpoint-and-turn-off.  Hardware state is not 
maintained.  (Some systems may support a special ACPI state that does 
maintain suspend power to external buses during shutdown, I forget what 
it's called.  And I down't know whether swsusp uses this state.)

So for example, let's say you have a filesystem mounted on a USB flash or
disk drive.  With Suspend-to-RAM, there's a very good chance that the
connection and filesystem will still be intact when you resume.  With
Suspend-to-Disk, the USB connection will terminate when the computer shuts
down.  When you resume, the device will be gone and your filesystem will
be screwed.

Alan Stern


^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2006-02-21 18:32 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-13 19:16 Flames over -- Re: Which is simpler? David Brownell
2006-02-13 20:08 ` Phillip Susi
2006-02-14  3:10   ` David Brownell
2006-02-14  6:05     ` Phillip Susi
2006-02-14 17:04       ` David Brownell
2006-02-15 23:43   ` Pavel Machek
2006-02-18 20:51     ` David Brownell
2006-02-19  6:06       ` Phillip Susi
2006-02-20  5:50         ` David Brownell
2006-02-20 16:07           ` Phillip Susi
2006-02-20 16:51             ` Olivier Galibert
2006-02-20 18:20               ` Phillip Susi
2006-02-20 18:44                 ` Olivier Galibert
2006-02-20 21:45                   ` Phillip Susi
2006-02-21 16:19             ` David Brownell
2006-02-21 18:30               ` Phillip Susi
  -- strict thread matches above, loose matches on Subject: below --
2006-02-12 16:57 Alan Stern
2006-02-13  0:51 ` Phillip Susi
2006-02-13  2:19   ` Alan Stern
2006-02-13  3:52     ` Phillip Susi
2006-02-13  5:43       ` Kyle Moffett
2006-02-13 16:40         ` Phillip Susi
2006-02-13 16:31       ` Alan Stern
2006-02-13 17:14         ` Phillip Susi
2006-02-13 20:04           ` Alan Stern
2006-02-13 20:38             ` Phillip Susi
2006-02-13 21:24               ` Alan Stern
2006-02-13 22:27                 ` Rafael J. Wysocki
2006-02-14 19:26                   ` Alan Stern
2006-02-14 20:41                     ` Rafael J. Wysocki
2006-02-14 21:08                       ` Lee Revell
2006-02-15 15:56                       ` Alan Stern
2006-02-13 22:51                 ` J. Bruce Fields
2006-02-13 23:47                 ` Phillip Susi
2006-02-14  0:50                   ` Kyle Moffett
2006-02-14  2:09                     ` Phillip Susi
2006-02-14  4:09                       ` Kyle Moffett
2006-02-14  4:28                         ` Alan Stern
2006-02-14  5:11                           ` Kyle Moffett
2006-02-14 15:33                             ` Alan Stern
2006-02-14  6:27                         ` Phillip Susi
2006-02-14 16:23                           ` Kyle Moffett
2006-02-14 18:39                             ` Phillip Susi
2006-02-14 19:55                               ` Kyle Moffett
2006-02-14 21:13                                 ` Phillip Susi
2006-02-14 23:32                                   ` Kyle Moffett
2006-02-15  3:08                                     ` Phillip Susi
2006-02-14 19:14                             ` Olivier Galibert
2006-02-14 19:37                               ` Phillip Susi
2006-02-17 21:04                   ` Pavel Machek
2006-02-18 16:34                     ` Phillip Susi
2006-02-18 17:29                       ` Pavel Machek
2006-02-19  5:52                         ` Phillip Susi
2006-02-19  9:02                           ` Pavel Machek
2006-02-19 16:35                             ` Phillip Susi
2006-02-19 16:41                               ` Alan Stern
2006-02-19 19:17                                 ` Phillip Susi
2006-02-19 19:43                                   ` Pavel Machek
2006-02-20  0:56                                     ` Olivier Galibert
2006-02-20  1:01                                       ` Pavel Machek
2006-02-20  1:26                                         ` Olivier Galibert
2006-02-20  4:04                                           ` Alan Stern
2006-02-19 20:16                                   ` Bernd Eckenfels
2006-02-18 21:04                     ` Alan Stern
2006-02-19  0:02                       ` Andrew Morton
2006-02-19  6:02                         ` Phillip Susi
2006-02-19  6:32                           ` Andrew Morton
2006-02-19 16:39                             ` Phillip Susi
2006-02-19 16:54                               ` Alan Stern
2006-02-19 20:02                                 ` Andrew Morton
2006-02-19 20:44                                   ` Oliver Neukum
2006-02-19 21:02                                     ` Andrew Morton
2006-02-20  6:55                                       ` Oliver Neukum
2006-02-20  7:29                                         ` Andrew Morton
2006-02-20  7:57                                           ` Andrew Morton
2006-02-14 14:15     ` hackmiester / Hunter Fuller
2006-02-15 23:51     ` Pavel Machek
2006-02-13  2:25   ` Kyle Moffett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox