Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166408
b: refs/heads/master
c: b417c9f
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Sep 22, 2009
1 parent aae6cd4 commit 23da225
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 3967684006f30c253bc6d4a6604d1bad4a7fc672
refs/heads/master: b417c9fd8690637f0c91479435ab3e2bf450c038
6 changes: 4 additions & 2 deletions trunk/arch/x86/kernel/cpu/mcheck/therm_throt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct thermal_state {

u64 next_check;
unsigned long throttle_count;
unsigned long last_throttle_count;
};

static DEFINE_PER_CPU(struct thermal_state, thermal_state);
Expand Down Expand Up @@ -120,11 +121,12 @@ static int therm_throt_process(bool is_throttled)
if (is_throttled)
state->throttle_count++;

if (!(was_throttled ^ is_throttled) &&
time_before64(now, state->next_check))
if (time_before64(now, state->next_check) &&
state->throttle_count != state->last_throttle_count)
return 0;

state->next_check = now + CHECK_INTERVAL;
state->last_throttle_count = state->throttle_count;

/* if we just entered the thermal event */
if (is_throttled) {
Expand Down

0 comments on commit 23da225

Please sign in to comment.