lkml.org 
[lkml]   [2008]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [BUG] cpufreq: constant cpu_khz
From
Date
On Mon, 2008-08-25 at 08:33 +0200, Peter Zijlstra wrote:
> Hi,
>
>
> 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, but I don't have enough clue
to know if its the correct fix, please advise.

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 46af716..2f10f8c 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -314,7 +319,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;
}



\
 
 \ /
  Last update: 2008-08-25 13:37    [W:0.043 / U:4.360 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site