Pārlūkot izejas kodu

x86: fix cpufreq + sched_clock() regression

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>
Peter Zijlstra 16 gadi atpakaļ
vecāks
revīzija
52a8968ce9
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      arch/x86/kernel/tsc.c

+ 1 - 1
arch/x86/kernel/tsc.c

@@ -314,7 +314,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
 			mark_tsc_unstable("cpufreq changes");
 			mark_tsc_unstable("cpufreq changes");
 	}
 	}
 
 
-	set_cyc2ns_scale(tsc_khz_ref, freq->cpu);
+	set_cyc2ns_scale(tsc_khz, freq->cpu);
 
 
 	return 0;
 	return 0;
 }
 }