[linux-pm] Re: Runtime PM and device locking

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

 



Hi!

> > This solution is very similar to the power object tree patch I'm currently
> > working on.  The main difference is that I'm using pre-state-change and
> > post-state-change notification methods.  The advantage is that we should
> > be able to use an iterative algorithm, allowing for deep power trees.  I'll
> > post code soon.
> 
> I'm looking forward to seeing it.  However, I think an iterative algorithm 
> may be impractical, to a greater or lesser extent.  (Not to mention the 
> fact that in any particular case we never need both pre- and post- 
> notifications.)
> 
> Consider a device that has many power parents (P1 - Pn).  A typical 
> power-state change for this device might have to go like this:
> 
> 	Do something to the device.
> 
> 	Notify P1.
> 
> 	Do some more to the device.
> 
> 	Notify P2.
> 
> 	Do some more to the device.
> 
> 	...
> 
> 	Notify Pn.
> 
> 	Do the last thing to the device.

Ouch, thats really ugly. Is it really neccessary to do something to
the device just after notifying parent?

I thought it would be more like

mouse
	"oh, I'm idle".
	power myself down. 
	tell all my parents that they can power down my cord.

If something is neccessary to be done after changing parent state, I'd
do it during call from parent.
								Pavel


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

[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