From: Pavel Machek <pavel@suse.cz>
To: Patrick Mochel <mochel@osdl.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Jens Axboe <axboe@suse.de>, Linus Torvalds <torvalds@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you?
Date: Wed, 10 Sep 2003 00:54:10 +0200 [thread overview]
Message-ID: <20030909225410.GD211@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44.0309091405020.695-100000@cherise>
Hi!
> > Patrick: As we discussed on IRC, the actual PM state constants you
> > defined don't match the old "S" levels, thus this code in ide-disk
> > suspend notifier:
> >
> > if (rq->pm->pm_state == 4)
> >
> > to avoid stopping the platter on suspend-to-disk will not work.
> >
> > Should I fix the above to use a PM_* constant or will you fix the
> > constants ?
>
> It should definitely be checking for a defined constant.
>
> However, I don't think we necessarily want to pass the system state we're
> entering to the drivers. It's per-driver policy to decide what device
> state to enter for each system state, which are orthogonal to the runtime
> device states that it could enter.
>
> For most devices, it's going to be 'off' (aka 3) for either suspend-to-ram
> or -disk. But, some devices will have varying or non-standard behavior.
> Like IDE drives or those few instances of ATI video devices on some power
> books that can only go into D2 instead of D3 on STR.
>
> To remedy this, I say we commit to the fact that it is the device state
> that's being passed down to the drivers. But, we get that state for each
> device from a field in the devices' power structures:
>
>
> struct dev_pm_info {
> ...
> u32 str_state;
> u32 std_state;
> };
>
> The bus will be able to set these on device registration, or the driver on
> binding. We can also expose them through sysfs to let userspace policy
> modify them. Otherwise they will default to the standard (3 aka 'off').
>
> What do you think?
I do think this is a bit complicated. I believe passing level, along
with type of the suspend (aka swsusp vs. S4bios) should be enough.
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
next prev parent reply other threads:[~2003-09-09 22:56 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-22 21:08 [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Pavel Machek
2003-08-22 21:25 ` Patrick Mochel
2003-08-22 21:53 ` Pavel Machek
2003-08-22 22:05 ` Patrick Mochel
2003-08-23 1:03 ` Nigel Cunningham
2003-08-23 16:22 ` Benjamin Herrenschmidt
2003-08-25 19:05 ` [PM] powering down special devices Patrick Mochel
2003-08-25 19:53 ` Benjamin Herrenschmidt
2003-08-25 9:52 ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Pavel Machek
2003-08-22 22:10 ` Pavel Machek
2003-08-22 22:13 ` Patrick Mochel
2003-08-22 22:17 ` Patrick Mochel
2003-08-22 22:36 ` Pavel Machek
2003-08-23 10:47 ` Russell King
2003-08-24 11:54 ` Russell King
2003-08-26 15:39 ` [PM] Config Options Patrick Mochel
2003-08-24 12:08 ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Russell King
2003-08-25 15:47 ` Patrick Mochel
2003-08-25 16:27 ` Russell King
2003-08-25 16:57 ` Matt Porter
2003-08-25 17:14 ` Russell King
2003-08-25 17:34 ` Matt Porter
2003-08-28 15:38 ` Platform Devices Patrick Mochel
2003-09-01 12:02 ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Pavel Machek
2003-09-02 17:41 ` Jens Axboe
2003-09-09 20:19 ` Benjamin Herrenschmidt
2003-09-09 20:24 ` Jens Axboe
2003-09-09 21:43 ` Patrick Mochel
2003-09-09 22:54 ` Pavel Machek [this message]
2003-09-09 23:07 ` Patrick Mochel
2003-09-09 23:07 ` [PM] Passing suspend level down to drivers Pavel Machek
2003-09-09 23:23 ` Patrick Mochel
2003-09-10 0:06 ` Pavel Machek
2003-09-10 6:12 ` Stephen Rothwell
2003-09-10 11:48 ` Alan Cox
2003-09-09 23:15 ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Alan Cox
2003-09-09 22:56 ` Pavel Machek
2003-08-25 17:16 ` Russell King
2003-08-22 22:04 ` Timothy Miller
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=20030909225410.GD211@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=axboe@suse.de \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--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;
as well as URLs for NNTP newsgroup(s).