Re: [RFC] dynamic device power management proposal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-03-22 at 05:39 +0800, Pavel Machek wrote:
> > > > 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);
> > 1. the device might suspend already here, we should resume it.
> > 2. mod_timer is a bad idea. It's too heavy, if the routine is called
> > very frequently, mod_timer will be a big overload. That's why I use
> a
> > timestamp. Updating a timestamp hasn't any overload.
> 
> Heh, if mod_timer is bad idea, we'll fix mod_timer. Anyway, if you use
> timestamp, you'll have to add polling, and that means overhead even
> when idle.
No, we don't need poll the timestamp frequently (maybe 1 minute or 5
minute one time depends on your requirement)

> Anyway, we do not have to decide that at this point.
> 
> > > 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.
> > Using this you will have a timer in the driver, and the timer's
> callback
> > will suspend the device. This approach has some issues. 1. it's
> better
> > driver doesn't handle device dependence. This approach requires
> driver
> > handle dependence.
> 
> Why not?
This will make driver complex. Driver should be as simple as possible.

Thanks,
Shaohua
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux