From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM list <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH 2/3] PM / cpuidle: Make ladder governor use the "disabled" state flag
Date: Mon, 13 Aug 2012 22:22:11 +0000 [thread overview]
Message-ID: <201208140022.12197.rjw@sisk.pl> (raw)
In-Reply-To: <201208140019.19288.rjw@sisk.pl>
For the mechanism introduced by commit cbc9ef0 (PM / Domains: Add
preliminary support for cpuidle, v2) to work with the ladder
governor, that governor should respect the "disabled" state flag
added by that commit. Change the ladder governor accordingly.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/cpuidle/governors/ladder.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux/drivers/cpuidle/governors/ladder.c
=================================--- linux.orig/drivers/cpuidle/governors/ladder.c
+++ linux/drivers/cpuidle/governors/ladder.c
@@ -88,6 +88,7 @@ static int ladder_select_state(struct cp
/* consider promotion */
if (last_idx < drv->state_count - 1 &&
+ !drv->states[last_idx + 1].disabled &&
!dev->states_usage[last_idx + 1].disable &&
last_residency > last_state->threshold.promotion_time &&
drv->states[last_idx + 1].exit_latency <= latency_req) {
@@ -101,7 +102,8 @@ static int ladder_select_state(struct cp
/* consider demotion */
if (last_idx > CPUIDLE_DRIVER_STATE_START &&
- (dev->states_usage[last_idx].disable ||
+ (drv->states[last_idx].disabled ||
+ dev->states_usage[last_idx].disable ||
drv->states[last_idx].exit_latency > latency_req)) {
int i;
next prev parent reply other threads:[~2012-08-13 22:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 22:19 [PATCH 0/3] PM / Domains: Fixes related to cpuidle Rafael J. Wysocki
2012-08-13 22:20 ` [PATCH 1/3] PM / Domains: Document cpuidle-related functions and change their names Rafael J. Wysocki
2012-08-13 22:22 ` Rafael J. Wysocki [this message]
2012-08-13 22:23 ` [PATCH 3/3] PM / Domains: Add operations related to cpuidle using domain names Rafael J. Wysocki
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=201208140022.12197.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).