From: venkatesh.pallipadi@intel.com
To: len.brown@intel.com, andi@firstfloor.org
Cc: linux-pm@lists.osdl.org
Subject: [patch 3/3] cpuidle: Make ladder governor honor latency requirements fully
Date: Wed, 30 Jul 2008 19:21:44 -0700 [thread overview]
Message-ID: <20080731022216.041218000@intel.com> (raw)
In-Reply-To: 20080731022141.088307000@intel.com
[-- Attachment #1: ladder_latency_requirement.patch --]
[-- Type: text/plain, Size: 1275 bytes --]
ladder governor only honored latency requirement when promoting C-states.
Instead. it should check for latency requirement on each idle call,
and demote to appropriate C-state when there is a latency requirement change.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
---
drivers/cpuidle/governors/ladder.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: linux-2.6/drivers/cpuidle/governors/ladder.c
===================================================================
--- linux-2.6.orig/drivers/cpuidle/governors/ladder.c 2008-07-28 15:49:10.000000000 -0700
+++ linux-2.6/drivers/cpuidle/governors/ladder.c 2008-07-28 15:49:21.000000000 -0700
@@ -99,6 +99,18 @@ static int ladder_select_state(struct cp
/* consider demotion */
if (last_idx > CPUIDLE_DRIVER_STATE_START &&
+ dev->states[last_idx].exit_latency > latency_req) {
+ int i;
+
+ for (i = last_idx - 1; i > CPUIDLE_DRIVER_STATE_START; i--) {
+ if (dev->states[i].exit_latency <= latency_req)
+ break;
+ }
+ ladder_do_selection(ldev, last_idx, i);
+ return i;
+ }
+
+ if (last_idx > CPUIDLE_DRIVER_STATE_START &&
last_residency < last_state->threshold.demotion_time) {
last_state->stats.demotion_count++;
last_state->stats.promotion_count = 0;
--
prev parent reply other threads:[~2008-07-31 2:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 2:21 [patch 0/3] cpuilde: Misc bug fixes venkatesh.pallipadi
2008-07-31 2:21 ` [patch 1/3] cpuidle: Do not use poll_idle unless user asks for it venkatesh.pallipadi
2008-07-31 2:21 ` [patch 2/3] cpuidle: Menu governor fix wrong usage of measured_us venkatesh.pallipadi
2008-07-31 2:21 ` venkatesh.pallipadi [this message]
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=20080731022216.041218000@intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=andi@firstfloor.org \
--cc=len.brown@intel.com \
--cc=linux-pm@lists.osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox