Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108574
b: refs/heads/master
c: 06d9e90
h: refs/heads/master
v: v3
  • Loading branch information
venkatesh.pallipadi@intel.com authored and Andi Kleen committed Aug 15, 2008
1 parent 7719e70 commit 4412d4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 320eee776357db52d6fcfb11cff985b1976a4595
refs/heads/master: 06d9e908b2248f983b186aaf569c58e1430db85d
12 changes: 12 additions & 0 deletions trunk/drivers/cpuidle/governors/ladder.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ static int ladder_select_state(struct cpuidle_device *dev)
}

/* 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++;
Expand Down

0 comments on commit 4412d4d

Please sign in to comment.