All of lore.kernel.org
 help / color / mirror / Atom feed
From: asinghal@codeaurora.org
To: linux-pm@lists.linux-foundation.org
Cc: johlstei@codeaurora.org
Subject: [RFC] Unprepare callback for cpuidle_device
Date: Wed, 6 Jul 2011 13:23:48 -0700 (PDT)	[thread overview]
Message-ID: <a619d8bbefd2f390a13d09084583dd39.squirrel@www.codeaurora.org> (raw)

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

             reply	other threads:[~2011-07-06 20:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 20:23 asinghal [this message]
2011-07-07  6:25 ` [RFC] Unprepare callback for cpuidle_device 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a619d8bbefd2f390a13d09084583dd39.squirrel@www.codeaurora.org \
    --to=asinghal@codeaurora.org \
    --cc=johlstei@codeaurora.org \
    --cc=linux-pm@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.