public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: David Brownell <david-b@pacbell.net>
Cc: linux-pm@lists.osdl.org, ncunningham@cyclades.com
Subject: Re: Problems with PM_FREEZE
Date: Thu, 29 Sep 2005 19:31:58 +0200	[thread overview]
Message-ID: <20050929173158.GJ1990@elf.ucw.cz> (raw)
In-Reply-To: <20050929171245.7012DE9E1F@adsl-69-107-32-110.dsl.pltn13.pacbell.net>

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

Hi!

> > Pavel is obviously right that the clean solution is to add a pm_message_t 
> > argument to resume().
> 
> I tend to disagree with that.  Changing every resume() method is
> not "clean", and it's more obvious to me that the pm_message
> semantics are (still) problematic.  Any argument to resume() would
> be encouraging fragile "if (came_from(X)) { ... }" style logic.

Alan wants to cut few miliseconds from suspend-to-disk. That's okay
with me, just add pm_message_t to resume(). If it is okay to use it in
specific driver is other question.

> Heck, there's still no way for drivers to know what the target
> system state is ... and THAT is a core issue here.
> 
> During FREEZE, the target system state is "something snapshottable".
> During SUSPEND, it's one of numerous variants of "low power" ... and
> device drivers can only guess which one it'll be.  (Is it an ACPI
> state?  S1, S3, S4?  Some non-ACPI platform state?)

Why does your driver need to know? Anyway, extending pm_message_t with
flags is okay with me.

> Case in point:  in some system low power states, drivers need to turn
> off certain clocks, and may not be able to support wakeup.  In others,
> drivers leave those clocks on, and can support wakeup.  But there is
> no way to figure out the target state given the pm_message ...

Eh? I do not see how knowing S1 vs. S3 vs. S4 help you here. It looks
more like "does user want to resume from that?" question.

								Pavel
-- 
if you have sharp zaurus hardware you don't need... you know my address

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2005-09-29 17:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-24  2:09 Problems with PM_FREEZE Alan Stern
2005-09-27 12:26 ` Pavel Machek
2005-09-27 19:02   ` Alan Stern
2005-09-27 19:58     ` Pavel Machek
2005-09-27 20:25       ` Alan Stern
2005-09-27 20:32         ` Pavel Machek
2005-09-27 21:30     ` Nigel Cunningham
2005-09-27 22:01       ` Pavel Machek
2005-09-27 23:19         ` Nigel Cunningham
2005-09-28  2:58           ` Alan Stern
2005-09-28  3:27             ` Nigel Cunningham
2005-09-28 15:46               ` David Brownell
2005-09-28 16:17               ` Alan Stern
2005-09-28 20:53                 ` Pavel Machek
2005-09-28 21:15                   ` Alan Stern
2005-09-28 21:18                     ` Pavel Machek
2005-09-28 21:20                   ` David Brownell
2005-09-28 21:22                     ` Pavel Machek
2005-09-28 13:03             ` Pavel Machek
2005-09-29 15:45               ` Alan Stern
2005-09-29 17:12                 ` David Brownell
2005-09-29 17:31                   ` Pavel Machek [this message]
2005-09-29 18:22                     ` David Brownell
2005-09-29 19:01                       ` Rafael J. Wysocki
2005-09-29 17:49                   ` Alan Stern
2005-09-28 13:04           ` Pavel Machek
2005-09-28 13:51             ` Rafael J. Wysocki
2005-09-28 18:54               ` Alan Stern
2005-09-28 19:09                 ` Rafael J. Wysocki
2005-09-28 19:31                   ` Alan Stern
2005-09-28 20:51                     ` Pavel Machek
2005-09-28 21:13                       ` Alan Stern
2005-09-28 21:19                         ` Pavel Machek
2005-09-28 21:56                     ` Rafael J. Wysocki
2005-09-28 22:01                       ` Pavel Machek
2005-09-28 22:14                         ` Rafael J. Wysocki
2005-09-28 20:51                 ` Pavel Machek
2005-09-28 21:08                   ` David Brownell
2005-09-28 21:13                     ` Pavel Machek
2005-09-28 21:12                   ` Alan Stern
2005-09-28 15:28         ` David Brownell

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=20050929173158.GJ1990@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=david-b@pacbell.net \
    --cc=linux-pm@lists.osdl.org \
    --cc=ncunningham@cyclades.com \
    /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