* A minimally power-aware driver treats all messages as SUSPEND?
@ 2008-07-01 7:29 Uwe Kleine-König
2008-07-01 14:17 ` Rafael J. Wysocki
2008-07-01 16:43 ` Linus Torvalds
0 siblings, 2 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2008-07-01 7:29 UTC (permalink / raw)
To: Andrew Morton, David Brownell, Linus Torvalds, Pavel Machek,
Rafael J. Wysocki
Cc: linux-kernel
Hello,
include/linux/pm.h claims:
A minimally power-aware driver treats all messages as SUSPEND
[...].
This was introduced in commit 82bb67f2 by David Brownell. At this time
PM_EVENT_HIBERNATE didn't exist. This was added in 3a2d5b70 by Rafael
J. Wysocki without updating the above sentence. I think a minimally
power-aware driver should treat all messages as HIBERNATE, shouldn't it?
Best regards
Uwe
--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A minimally power-aware driver treats all messages as SUSPEND?
2008-07-01 7:29 A minimally power-aware driver treats all messages as SUSPEND? Uwe Kleine-König
@ 2008-07-01 14:17 ` Rafael J. Wysocki
2008-07-01 15:14 ` Uwe Kleine-König
2008-07-01 16:43 ` Linus Torvalds
1 sibling, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2008-07-01 14:17 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Andrew Morton, David Brownell, Linus Torvalds, Pavel Machek,
linux-kernel
On Tuesday, 1 of July 2008, Uwe Kleine-König wrote:
> Hello,
>
> include/linux/pm.h claims:
>
> A minimally power-aware driver treats all messages as SUSPEND
> [...].
>
> This was introduced in commit 82bb67f2 by David Brownell. At this time
> PM_EVENT_HIBERNATE didn't exist. This was added in 3a2d5b70 by Rafael
> J. Wysocki without updating the above sentence. I think a minimally
> power-aware driver should treat all messages as HIBERNATE, shouldn't it?
No, I don't think so. In the majority of cases, SUSPEND is equivalent to the
combination of FREEZE and HIBERNATE.
Still, this is going to change anyway with the introduction of the new
suspend/hibernation callbacks that are scheduled for 2.6.27.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A minimally power-aware driver treats all messages as SUSPEND?
2008-07-01 14:17 ` Rafael J. Wysocki
@ 2008-07-01 15:14 ` Uwe Kleine-König
2008-07-01 15:35 ` Rafael J. Wysocki
2008-07-02 1:08 ` Matthew Garrett
0 siblings, 2 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2008-07-01 15:14 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Andrew Morton, David Brownell, Linus Torvalds, Pavel Machek,
linux-kernel@vger.kernel.org
Hello Rafael,
Rafael J. Wysocki wrote:
> On Tuesday, 1 of July 2008, Uwe Kleine-König wrote:
> > include/linux/pm.h claims:
> >
> > A minimally power-aware driver treats all messages as SUSPEND
> > [...].
> >
> > This was introduced in commit 82bb67f2 by David Brownell. At this time
> > PM_EVENT_HIBERNATE didn't exist. This was added in 3a2d5b70 by Rafael
> > J. Wysocki without updating the above sentence. I think a minimally
> > power-aware driver should treat all messages as HIBERNATE, shouldn't it?
>
> No, I don't think so. In the majority of cases, SUSPEND is equivalent to the
> combination of FREEZE and HIBERNATE.
I didn't get that. I thought SUSPEND is suspend-to-ram and HIBERNATE is
suspend-to-disk, so HIBERNATE is the "deeper sleep".
With that I might have to do less on SUSPEND because some state might be
preserved after the machine comes up again.
> Still, this is going to change anyway with the introduction of the new
> suspend/hibernation callbacks that are scheduled for 2.6.27.
in next?
Best regards
Uwe
--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A minimally power-aware driver treats all messages as SUSPEND?
2008-07-01 15:14 ` Uwe Kleine-König
@ 2008-07-01 15:35 ` Rafael J. Wysocki
2008-07-02 1:08 ` Matthew Garrett
1 sibling, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2008-07-01 15:35 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Andrew Morton, David Brownell, Linus Torvalds, Pavel Machek,
linux-kernel@vger.kernel.org
On Tuesday, 1 of July 2008, Uwe Kleine-König wrote:
> Hello Rafael,
>
> Rafael J. Wysocki wrote:
> > On Tuesday, 1 of July 2008, Uwe Kleine-König wrote:
> > > include/linux/pm.h claims:
> > >
> > > A minimally power-aware driver treats all messages as SUSPEND
> > > [...].
> > >
> > > This was introduced in commit 82bb67f2 by David Brownell. At this time
> > > PM_EVENT_HIBERNATE didn't exist. This was added in 3a2d5b70 by Rafael
> > > J. Wysocki without updating the above sentence. I think a minimally
> > > power-aware driver should treat all messages as HIBERNATE, shouldn't it?
> >
> > No, I don't think so. In the majority of cases, SUSPEND is equivalent to the
> > combination of FREEZE and HIBERNATE.
> I didn't get that. I thought SUSPEND is suspend-to-ram and HIBERNATE is
> suspend-to-disk, so HIBERNATE is the "deeper sleep".
> With that I might have to do less on SUSPEND because some state might be
> preserved after the machine comes up again.
>
> > Still, this is going to change anyway with the introduction of the new
> > suspend/hibernation callbacks that are scheduled for 2.6.27.
> in next?
Yes.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A minimally power-aware driver treats all messages as SUSPEND?
2008-07-01 15:14 ` Uwe Kleine-König
2008-07-01 15:35 ` Rafael J. Wysocki
@ 2008-07-02 1:08 ` Matthew Garrett
2008-07-02 2:57 ` David Brownell
1 sibling, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2008-07-02 1:08 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Rafael J. Wysocki, Andrew Morton, David Brownell, Linus Torvalds,
Pavel Machek, linux-kernel@vger.kernel.org
On Tue, Jul 01, 2008 at 05:14:15PM +0200, Uwe Kleine-König wrote:
> With that I might have to do less on SUSPEND because some state might be
> preserved after the machine comes up again.
The only hardware state guaranteed by ACPI is the contents of RAM. It's
valid for the platform to cut the power rails to everything else, so
from a driver point of view it's almost always equivalent to
hibernation.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A minimally power-aware driver treats all messages as SUSPEND?
2008-07-02 1:08 ` Matthew Garrett
@ 2008-07-02 2:57 ` David Brownell
0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2008-07-02 2:57 UTC (permalink / raw)
To: Matthew Garrett, Uwe Kleine-König
Cc: Rafael J. Wysocki, Andrew Morton, Linus Torvalds, Pavel Machek,
linux-kernel@vger.kernel.org
On Tuesday 01 July 2008, Matthew Garrett wrote:
> On Tue, Jul 01, 2008 at 05:14:15PM +0200, Uwe Kleine-König wrote:
>
> > With that I might have to do less on SUSPEND because some state might be
> > preserved after the machine comes up again.
>
> The only hardware state guaranteed by ACPI is the contents of RAM. It's
> valid for the platform to cut the power rails to everything else, so
> from a driver point of view it's almost always equivalent to
> hibernation.
Right. And moreover ... the way many drivers support suspend-to-RAM
in that "minimally power-aware" sense is kind of brain-dead: they
resume by resetting and re-initializing everything!! Which trashes
any state that the hardware may have been preserving.
So, there's no no real difference between SUSPEND and HIBERNATE modes
unless drivers do more than that bare minimum.
The more intelligent drivers will leverage hardware low power states,
and be able to use one of potentially many "retention" modes. Those
are the drivers which may well support wakeup events; issuing wakeups
requiress the device to stay at least partially functional.
- Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: A minimally power-aware driver treats all messages as SUSPEND?
2008-07-01 7:29 A minimally power-aware driver treats all messages as SUSPEND? Uwe Kleine-König
2008-07-01 14:17 ` Rafael J. Wysocki
@ 2008-07-01 16:43 ` Linus Torvalds
1 sibling, 0 replies; 7+ messages in thread
From: Linus Torvalds @ 2008-07-01 16:43 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Andrew Morton, David Brownell, Pavel Machek, Rafael J. Wysocki,
linux-kernel
On Tue, 1 Jul 2008, Uwe Kleine-König wrote:
>
> This was introduced in commit 82bb67f2 by David Brownell. At this time
> PM_EVENT_HIBERNATE didn't exist. This was added in 3a2d5b70 by Rafael
> J. Wysocki without updating the above sentence. I think a minimally
> power-aware driver should treat all messages as HIBERNATE, shouldn't it?
No.
A minimally power-aware driver should aim to work with STR.
HIBERNATE should be a secondary goal (if even that).
Linus
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-02 3:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 7:29 A minimally power-aware driver treats all messages as SUSPEND? Uwe Kleine-König
2008-07-01 14:17 ` Rafael J. Wysocki
2008-07-01 15:14 ` Uwe Kleine-König
2008-07-01 15:35 ` Rafael J. Wysocki
2008-07-02 1:08 ` Matthew Garrett
2008-07-02 2:57 ` David Brownell
2008-07-01 16:43 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox