From: john stultz <johnstul@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Chris McDermott <lcm@us.ibm.com>,
ia64 <linux-ia64@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
David Mosberger <davidm@hpl.hp.com>
Subject: [PATCH] linux-2.6.3_time-interpolator-fix_A0
Date: Mon, 23 Feb 2004 19:44:29 +0000 [thread overview]
Message-ID: <1077565468.19860.78.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <16435.3326.193311.110598@napali.hpl.hp.com>
[Resending to Andrew and LKML]
All,
In developing the ia64-cyclone patch, which implements a cyclone based
time interpolator, I found the following bug which could cause time
inconsistencies.
In update_wall_time_one_tick(), which is called each timer interrupt, we
call time_interpolator_update(delta_nsec) where delta_nsec is
approximately NSEC_PER_SEC/HZ. This directly correlates with the changes
to xtime which occurs in update_wall_time_one_tick().
However in update_wall_time(), on a second overflow, we again call
time_interpolator_update(NSEC_PER_SEC). However while the components of
xtime are being changed, the overall value of xtime does not (nsec is
decremented NSEC_PER_SEC and sec is incremented). Thus this call to
time_interpolator_update is incorrect.
This patch removes the incorrect call to time_interpolator_update and
was found to resolve the time inconsistencies I had seen while
developing the ia64-cyclone patch.
Please consider for inclusion.
diff -Nru a/kernel/timer.c b/kernel/timer.c
--- a/kernel/timer.c Wed Feb 18 12:04:03 2004
+++ b/kernel/timer.c Wed Feb 18 12:04:03 2004
@@ -677,7 +677,6 @@
if (xtime.tv_nsec >= 1000000000) {
xtime.tv_nsec -= 1000000000;
xtime.tv_sec++;
- time_interpolator_update(NSEC_PER_SEC);
second_overflow();
}
}
next prev parent reply other threads:[~2004-02-23 19:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-12 3:22 [RFC][PATCH] linux-2.6.3-rc2_ia64-cyclone_A0 john stultz
2004-02-13 0:14 ` David Mosberger
2004-02-13 1:05 ` john stultz
2004-02-13 1:16 ` David Mosberger
2004-02-13 1:41 ` Chris McDermott
2004-02-13 2:07 ` David Mosberger
2004-02-13 2:29 ` john stultz
2004-02-13 7:09 ` David Mosberger
2004-02-13 18:55 ` Mallick, Asit K
2004-02-17 2:46 ` john stultz
2004-02-17 21:41 ` David Mosberger
2004-02-18 5:20 ` [RFC][PATCH] linux-2.6.3-rc2_ia64-cyclone_A1 john stultz
2004-02-18 6:42 ` possible time_interpolator bug? john stultz
2004-02-18 6:58 ` David Mosberger
2004-02-23 19:44 ` john stultz [this message]
2004-02-23 19:55 ` [PATCH] linux-2.6.3_time-interpolator-fix_A0 David Mosberger
-- strict thread matches above, loose matches on Subject: below --
2004-02-18 20:29 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=1077565468.19860.78.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=akpm@osdl.org \
--cc=davidm@hpl.hp.com \
--cc=lcm@us.ibm.com \
--cc=linux-ia64@vger.kernel.org \
--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