From: Avi Kivity <avi@argo.co.il>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH][x86-64] fix pit delay accounting in timer_interrupt()
Date: Mon, 28 Feb 2005 15:46:37 +0200 [thread overview]
Message-ID: <1109598397.4081.5.camel@avik.scalemp> (raw)
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
timer_interrupt() measures the delay from an interrupt to its handling
in a variable called 'delay', but accounts every unit of delay as 1/HZ
seconds, instead of 1/CLOCK_TICK_RATE seconds.
on ordinary cpus this doesn't matter as delay is usually zero, but on my
10MHz bochs cpu this causes divide overflows later on.
(patch against 2.6.9 but should apply)
Signed-off-by: Avi Kivity <avi@argo.co.il>
[-- Attachment #2: pit-delay.patch --]
[-- Type: text/plain, Size: 470 bytes --]
--- linux-2.6.9/arch/x86_64/kernel/time.c~time 2005-02-28 14:26:52.000000000 +0200
+++ linux-2.6.9/arch/x86_64/kernel/time.c 2005-02-28 14:28:46.000000000 +0200
@@ -409,7 +409,7 @@
monotonic_base += (tsc - vxtime.last_tsc)*1000000/cpu_khz ;
- vxtime.last_tsc = tsc - vxtime.quot * delay / vxtime.tsc_quot;
+ vxtime.last_tsc = tsc - vxtime.quot * delay / (LATCH * vxtime.tsc_quot);
if ((((tsc - vxtime.last_tsc) *
vxtime.tsc_quot) >> 32) < offset)
reply other threads:[~2005-02-28 13:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1109598397.4081.5.camel@avik.scalemp \
--to=avi@argo.co.il \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®