From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-kernel@vger.kernel.org
Subject: Question: monolitic_clock, timer_{tsc,hpet} and CPUFREQ
Date: Thu, 4 Sep 2003 22:14:24 -0500 [thread overview]
Message-ID: <200309042214.28179.dtor_core@ameritech.net> (raw)
I noticed that although timer_tsc registers cpufreq notifier to detect
frequency changes and adjust cpu_khz it does not set cyc2ns_scale. Is
monotonic clocks supposed to be also accurate?
Will something like this suffice for timer_tsc (compiled, not yet booted):
--- 2.6.0-test4/arch/i386/kernel/timers/timer_tsc.c 2003-08-26 21:56:19.000000000 -0500
+++ linux-2.6.0-test4/arch/i386/kernel/timers/timer_tsc.c 2003-09-04 22:08:27.000000000 -0500
@@ -315,6 +315,7 @@
if (use_tsc) {
fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq);
cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new);
+ set_cyc2ns_scale(cpu_khz/1000);
}
#endif
}
next reply other threads:[~2003-09-05 3:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-05 3:14 Dmitry Torokhov [this message]
2003-09-05 8:13 ` Question: monolitic_clock, timer_{tsc,hpet} and CPUFREQ john stultz
2003-09-07 18:57 ` Dominik Brodowski
2003-09-08 17:30 ` john stultz
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=200309042214.28179.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
/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.