Skip to content

Commit

Permalink
x86: fix cpufreq + sched_clock() regression
Browse files Browse the repository at this point in the history
I noticed that my sched_clock() was slow on a number of machine, so I
started looking at cpufreq.

The below seems to fix the problem for me.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 25, 2008
1 parent f58899b commit 52a8968
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
mark_tsc_unstable("cpufreq changes");
}

set_cyc2ns_scale(tsc_khz_ref, freq->cpu);
set_cyc2ns_scale(tsc_khz, freq->cpu);

return 0;
}
Expand Down

0 comments on commit 52a8968

Please sign in to comment.