All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: cpufreq@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	davej <davej@codemonkey.org.uk>
Subject: Re: [BUG] cpufreq: constant cpu_khz
Date: Mon, 25 Aug 2008 13:35:06 +0200	[thread overview]
Message-ID: <1219664106.8515.50.camel@twins> (raw)
In-Reply-To: <1219646032.20732.10.camel@twins>

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;
 }



  reply	other threads:[~2008-08-25 11:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25  6:33 [BUG] cpufreq: constant cpu_khz Peter Zijlstra
2008-08-25 11:35 ` Peter Zijlstra [this message]
2008-08-25 12:39   ` Ingo Molnar
2008-08-25 17:34     ` Alok Kataria
2008-08-25 17:55     ` Dave Jones
2008-08-25 17:57       ` Ingo Molnar
2008-08-25 18:22         ` Arjan van de Ven
2008-08-25 19:27           ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1219664106.8515.50.camel@twins \
    --to=peterz@infradead.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.