Skip to content

Commit

Permalink
cpufreq / intel_pstate: Set timer timeout correctly
Browse files Browse the repository at this point in the history
The current calculation of the delay time is wrong and a cut and
paste error from a previous experimental driver.  This can result in
the timeout being set to jiffies + 1 which setup the driver to race
with itself if the APIC timer interrupt happens at just the right
time.

References: https://bugzilla.redhat.com/show_bug.cgi?id=920289
Reported-by: Adam Williamson <awilliam@redhat.com>
Reported-and-tested-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Dirk Brandewie authored and Rafael J. Wysocki committed Apr 8, 2013
1 parent 31880c3 commit ec376a2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,6 @@ static inline void intel_pstate_set_sample_time(struct cpudata *cpu)

sample_time = cpu->pstate_policy->sample_rate_ms;
delay = msecs_to_jiffies(sample_time);
delay -= jiffies % delay;
mod_timer_pinned(&cpu->timer, jiffies + delay);
}

Expand Down

0 comments on commit ec376a2

Please sign in to comment.