Messages in this thread |  | | Date | Thu, 29 Jan 2009 10:29:11 -0600 | | From | Jon Hunter <> | | Subject | Re: [RFC] Dynamic Tick and Deferrable Timer Support |
| |
Pallipadi, Venkatesh wrote:
> max_delta would depend on the timer in the platform. With HPET this > should be much larger than 2.15 secs.
So I agree that the HPET hardware in newer devices themselves would allow longer sleep periods. However, this is not the problem I was raising.
The problem is that the dynamic tick uses a 32-bit variable, max_delta_ns, to define that max sleep time of a device in nanoseconds. The maximum value that this variable can be assigned is LONG_MAX or 0x7fffffff nanoseconds (see function clockevent_delta2ns). The value 0x7fffffff nanoseconds equates to ~2.15 seconds. Hence, without increasing the dynamic range of max_delta_ns (ie. make this a 64-bit integer) or change the base of this variable from nanoseconds to milliseconds, I don't see how the device will ever sleep for longer than ~2.15 seconds.
I have spent several weeks trying to suppress kernel timers using the deferred timers and lengthen the sleep time. I am now able to get the device to sleep for minutes but I found that max_delta_ns is a limiting factor. I will be surprised if you can sleep for longer than ~2.15 seconds with the current implementation.
Let me know if this makes sense.
> Ok. Thinking about it a bit more, I think we can push this > patch along. > Thomas/Andrew, can one of you pick up this patch..
Great thanks.
Jon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |