Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190734
b: refs/heads/master
c: 1c6fe03
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed May 10, 2010
1 parent ae9ae29 commit 34e54bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1c448e0a9e99c76f4ece368714fb35a40a8daba
refs/heads/master: 1c6fe0364fa7bf28248488753ee0afb6b759cd04
9 changes: 4 additions & 5 deletions trunk/drivers/cpuidle/governors/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ struct menu_device {
int needs_update;

unsigned int expected_us;
unsigned int measured_us;
u64 predicted_us;
unsigned int exit_us;
unsigned int bucket;
Expand Down Expand Up @@ -187,14 +186,14 @@ static int menu_select(struct cpuidle_device *dev)
int i;
int multiplier;

data->last_state_idx = 0;
data->exit_us = 0;

if (data->needs_update) {
menu_update(dev);
data->needs_update = 0;
}

data->last_state_idx = 0;
data->exit_us = 0;

/* Special case when user has set very strict latency requirement */
if (unlikely(latency_req == 0))
return 0;
Expand Down Expand Up @@ -294,7 +293,7 @@ static void menu_update(struct cpuidle_device *dev)
new_factor = data->correction_factor[data->bucket]
* (DECAY - 1) / DECAY;

if (data->expected_us > 0 && data->measured_us < MAX_INTERESTING)
if (data->expected_us > 0 && measured_us < MAX_INTERESTING)
new_factor += RESOLUTION * measured_us / data->expected_us;
else
/*
Expand Down

0 comments on commit 34e54bd

Please sign in to comment.