Re: suspend_delay implementation

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

 



On Sat, 4 Sep 2010, Rafael J. Wysocki wrote:

> OK, so in the context of my other message, I think we need these types of
> helpers:
> 
> (1) "suspend X ms from now"
> (2) "suspend X ms from now if the device has been inactive for Y ms"
> 
> where Y is set by user space (and X may be 0).
> 
> To me, the both of them make sense.

(2) is really: "starting X ms from now, wait until the device has been
inactive for Y ms and then suspend".

Well and good, but what about pm_runtime_suspend?  Should it respect 
the Y ms delay?  Even if the last helper called was (1)?

Suppose the driver uses either helper (1) or helper (2) and then some
other piece of code calls pm_runtime_get_sync followed by
pm_runtime_put_sync.  The get_sync will cancel the timer, but what
should the put_sync do?

Your helper (1) bypasses the user's requirement for Y ms of inactivity
before a runtime suspend.  When should the bypass end and normal
behavior (i.e., using the Y-ms delay) be restored?  The next time 
either helper is called?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux