* [PATCH] linux-2.6.3_time-interpolator-fix_A0
@ 2004-02-18 20:29 john stultz
0 siblings, 0 replies; 3+ messages in thread
From: john stultz @ 2004-02-18 20:29 UTC (permalink / raw)
To: linux-ia64
On Tue, 2004-02-17 at 22:58, David Mosberger wrote:
> >>>>> On Tue, 17 Feb 2004 22:42:54 -0800, john stultz <johnstul@us.ibm.com> said:
> John> Am I just missing something here?
>
> I don't think so. Good bug hunting. Some time ago SGI reported some
> jumpiness but I never got a definite answer whether the problem had
> been solved.
>
> You may want to run this by someone who actually understands the code
> in timer.c but I'm pretty sure you're right.
Sounds good, here is the patch then.
Any further feed back would be appreciated.
thanks
-john
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 into your tree.
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();
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] linux-2.6.3_time-interpolator-fix_A0
2004-02-18 6:58 ` David Mosberger
@ 2004-02-23 19:44 ` john stultz
2004-02-23 19:55 ` David Mosberger
0 siblings, 1 reply; 3+ messages in thread
From: john stultz @ 2004-02-23 19:44 UTC (permalink / raw)
To: Andrew Morton; +Cc: Chris McDermott, ia64, lkml, David Mosberger
[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();
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] linux-2.6.3_time-interpolator-fix_A0
2004-02-23 19:44 ` [PATCH] linux-2.6.3_time-interpolator-fix_A0 john stultz
@ 2004-02-23 19:55 ` David Mosberger
0 siblings, 0 replies; 3+ messages in thread
From: David Mosberger @ 2004-02-23 19:55 UTC (permalink / raw)
To: john stultz; +Cc: Andrew Morton, Chris McDermott, ia64, lkml, David Mosberger
>>>>> On Mon, 23 Feb 2004 11:44:29 -0800, john stultz <johnstul@us.ibm.com> said:
John> This patch removes the incorrect call to
John> time_interpolator_update and was found to resolve the time
John> inconsistencies I had seen while developing the ia64-cyclone
John> patch.
John> Please consider for inclusion.
In case it isn't clear: this patch has my support.
--david
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-23 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-18 20:29 [PATCH] linux-2.6.3_time-interpolator-fix_A0 john stultz
-- strict thread matches above, loose matches on Subject: below --
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 ` [PATCH] linux-2.6.3_time-interpolator-fix_A0 john stultz
2004-02-23 19:55 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox