All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Unprepare callback for cpuidle_device
@ 2011-07-06 20:23 asinghal
  2011-07-07  6:25 ` Trinabh Gupta
  0 siblings, 1 reply; 8+ messages in thread
From: asinghal @ 2011-07-06 20:23 UTC (permalink / raw)
  To: linux-pm; +Cc: johlstei

We plan to use high resolution timers in one of our modules, with the
requirement that we cancel these timers when the cpu goes idle and restart
them when the cpu comes out of idle.

We are cancelling the timers in cpuidle prepare callback. The problem is
that if the need_resched() call in drivers/cpuidle/cpuidle.c returns true,
how do we restart the timer? If the call returns false, we can restart the
timer in the cpuidle enter callback.

The solution to the problem that we have in mind is adding an unprepare
callback to the cpuidle_device struct, and calling it if needs_resched()
returns true. Another option is to implement deferred timers for hrtimers.
Which of the two options is the better solution, or is there another
feasible alternative?

sincerely,
Amar Singhal

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-12 18:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06 20:23 [RFC] Unprepare callback for cpuidle_device asinghal
2011-07-07  6:25 ` Trinabh Gupta
2011-07-07 19:52   ` asinghal
2011-07-08 13:03     ` Deepthi Dharwar
2011-07-11 17:26       ` asinghal
2011-07-11 19:08         ` Vaidyanathan Srinivasan
2011-07-11 21:45           ` asinghal
2011-07-12 18:32             ` Vaidyanathan Srinivasan

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.