From: Pavel Machek <pavel@ucw.cz>
To: Shaohua Li <shaohua.li@intel.com>
Cc: linux-pm <linux-pm@lists.osdl.org>
Subject: Re: [RFC] dynamic device power management proposal
Date: Tue, 20 Mar 2007 19:30:22 +0100 [thread overview]
Message-ID: <20070320183022.GC2670@elf.ucw.cz> (raw)
In-Reply-To: <1174295302.31250.1.camel@sli10-conroe.sh.intel.com>
Hi!
> Runtime device power management or dynamic device power management
> (dpm).
>
> Why dpm:
> 1. put an idle device into low power state to save power
> 2. speed up S3/S4. In resume time, we could resume devices only as
> the devices are used. In suspend time, we could skip suspended
> devices. (suspend/resume a device equals to change device state)
>
> Basically we need device driver support, a kernel framework and a policy
> (determine when to change a device???s power state).
So far so good, but please use ascii ' for '.
> I think we need answer below questions:
> 1. How to present device???s power info/control interface to policy.
...
Depends on bus, I'm afraid. We do not want to do this in generic code.
> 2. How to handle devices dependences. For example, for a PCI endpoint
...
USB gets the dependencies right, just copy that.
> 3. How to detect if a device is idle.
USB gets this right. It is driver specific, but core can provide some
helpers.
> int foo() //all service routines of the driver should do
> {
> //wakeup the device if it???s suspended
> dpm_active_device();
No, we do not want this kind of interface. It should be something like
mod_timer(my_timer, HZ+10);
We can talk about generic device attribute "powerdown_timeout" in
sysfs... but I'd prefer few more drivers that do powersave before we
do that.
> We consider two type devices:
> 1. for soundcard, policy does:
> a. Setup a timer, the timer polls soundcard???s busy_timestamp sysfs file.
> b. if the timer found soundcard is idle for a long time, write the
> device???s state sysfs file, and sound card to low power state.
> c. policy does nothing to resume soundcard. Soundcard driver???s service
> routine will call ???dpm_active_device??? to resume the device
No, that's not how it works; look at hda_audio, it already has
powersave. Just power down audio card 5 seconds after its control file
is closed.
> 2. For keyboard or mouse, policy does:
> a. setup a timer, the timer polls keyboard???s busy_timestamp sysfs file.
> b. if the timer found keyboard is idle for a long time, write LCD???s
> state sysfs file to close LCD.
> c. After LCD is closed, policy polls keyboard???s busy_timestamp sysfs
> file.
> d. if the content changed of the file (maybe using inotify), policy will
> open LCD
This already works for usb keyboard/mice.
> This is my preliminary design, and I???d like to listen to your opinions.
"Seriously overdesigned".
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-03-20 18:30 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 9:08 [RFC] dynamic device power management proposal Shaohua Li
2007-03-19 15:44 ` Alan Stern
2007-03-20 1:06 ` Shaohua Li
2007-03-20 14:58 ` Alan Stern
2007-03-21 1:43 ` Shaohua Li
2007-03-21 14:44 ` Alan Stern
2007-03-22 4:42 ` Len Brown
2007-03-22 11:56 ` Jim Gettys
2007-03-22 19:28 ` David Brownell
2007-03-22 13:20 ` Pavel Machek
2007-03-22 13:44 ` Oliver Neukum
2007-03-22 13:56 ` Pavel Machek
2007-03-22 14:18 ` Oliver Neukum
2007-03-22 14:22 ` Pavel Machek
2007-03-22 14:26 ` Oliver Neukum
2007-03-22 14:35 ` Pavel Machek
2007-03-22 19:41 ` David Brownell
2007-03-22 19:58 ` David Brownell
2007-03-20 18:30 ` Pavel Machek [this message]
2007-03-21 1:34 ` Shaohua Li
2007-03-21 15:21 ` Amit Kucheria
2007-03-21 21:49 ` Dmitry Krivoschekov
2007-03-21 22:54 ` Pavel Machek
2007-03-21 21:39 ` Pavel Machek
2007-03-22 3:09 ` Shaohua Li
2007-03-22 13:13 ` Pavel Machek
2007-03-22 19:20 ` David Brownell
2007-03-22 20:32 ` Alan Stern
2007-03-22 20:02 ` David Brownell
2007-03-22 22:10 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2007-03-21 20:19 Scott E. Preece
2007-03-21 21:45 ` Pavel Machek
2007-03-26 13:53 ` Amit Kucheria
2007-03-22 13:39 Scott E. Preece
2007-03-22 13:48 ` Oliver Neukum
2007-03-22 14:01 ` Pavel Machek
2007-03-22 14:45 ` Alan Stern
2007-03-22 18:53 ` David Brownell
2007-03-22 19:05 Scott E. Preece
2007-03-27 12:05 ` Pavel Machek
2007-03-27 12:19 ` Oliver Neukum
2007-03-22 19:18 Scott E. Preece
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=20070320183022.GC2670@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-pm@lists.osdl.org \
--cc=shaohua.li@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.