lkml.org 
[lkml]   [1998]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: NTP dumps Linux, film at 11. [Fwd/FYI]
It turns out that these problems can be mitigated by a patch
like:

--- time.c.orig Fri Oct 2 15:09:15 1998
+++ linux/arch/i386/kernel/time.c Tue Oct 6 14:57:45 1998
@@ -409,9 +409,18 @@
*/
static void pentium_timer_interrupt(int irq, void *dev_id, struct
pt_regs *regs)
{
- register unsigned long edx asm("dx");
+ register unsigned long edx;
int count, flags;

+ int usecs;
+
+ for (usecs = do_fast_gettimeoffset();
+ usecs >= 18000;
+ usecs -= 10000) {
+ /* Try and restore all the dropped interrupts */
+ do_timer(regs);
+ }
+
/* It is important that these two operations happen almost at
the
* same time. We do the RDTSC stuff first, since it's faster.
To
* avoid any inconsistencies, we disable interrupts.

I'm not sure that it will apply to a clean 2.0.36. You also need to
fix do_fast_gettimeoffset not to limit the time returned to be under
one tick (which introduces all sorts of problems anyway).

I run a kernel patch with Ingo Molnar's fix to calibrate the TSC
and then use that value to convert TSC values into usecs.

Philip

Theodore Y. Ts'o wrote:
>
> Date: Mon, 30 Nov 1998 17:48:18 -0500
> From: "Brandon S. Allbery KF8NH" <allbery@kf8nh.apk.net>
>
> What's involved? We use NTP quite a lot, especially for the Linux
> boxes (RH5 systems tend to drift a *lot* for some strange
> reason...
>
> Well, one thing which I recently noticed is that if you're using a
> BusToaster SCSI PCMCIA card (great name, isn't it? :-) It's basically
> Adaptec 152x controller), and you run mke2fs -c on a JAZ drive, your
> clock will slow down an amazing amount --- over five minutes over the
> course of that single command (which was enough to make Kerberos
> complain about clock skew problems).
>
> So there are at least a few device drivers which are apparently holding
> interrupts off long enough so that we lose a clock interrupt. Not good,
> and one of the reasons why any attempts to tweak the Linux scheduler to
> make it a "real-time system" simply elicits a smile from me..... oh, if
> only it were so easy! :-)
>
> - Ted
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

--
Philip Gladstone +1 781 530 2461
Raptor Systems / Axent Technologies
Waltham, MA http://www.raptor.com/[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2005-03-22 13:45    [W:2.133 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site