x86: fix cpufreq + sched_clock() regression
authorPeter Zijlstra <peterz@infradead.org>
Mon, 25 Aug 2008 11:35:06 +0000 (13:35 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 25 Aug 2008 12:39:19 +0000 (14:39 +0200)
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>
arch/x86/kernel/tsc.c

index 9bed5ca..8e786b0 100644 (file)
@@ -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;
 }