From: george anzinger <george@mvista.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tyson D Sawyer <tyson@rwii.com>,
linux-kernel@vger.kernel.org, "Grover,
Andrew" <andrew.grover@intel.com>
Subject: Re: Missed jiffies
Date: Sat, 16 Feb 2002 11:02:21 -0800 [thread overview]
Message-ID: <3C6EACBD.A380D235@mvista.com> (raw)
In-Reply-To: <E16c7yN-0006a2-00@the-village.bc.nu>
Alan Cox wrote:
>
> > My system looses about 8 seconds every 20 minutes. This is reported
> > by ntp and verified by comparing 'date' to 'hwclock --show' and a wall
> > clock.
> >
> > My system is a x86 Dell laptop with HZ=1024.
> >
> > I am quite certain that the issue is the System Management Interrupt
> > (SMI).
>
> Possibly and if it is you can't really do much about it.
>
> > I don't know that there is a solution for all systems, however, at
> > least on pentium systems it seems possible to use the TSC to catch
>
> Most vendor systems don't have SMI problems that bad, you can normally hit
> the 100Hz or 1Khz tick quite reliably.
>
> > tsc_remainder += last_tsc_low-tsc_low;
>
> The tsc is not a constant on some laptops, and may not be present, or not
> be reliable.
>
> > What strategies might be employed to prevent degraded system
> > performance since this code is in a criticle path?
>
> Adding a time slew is a well understood problem - the NTP code and papers
> cover some very efficient implementation techniques. If you can work out
> the drift then drifting back is extremely efficient and the kernel already
> implements the needed PLL.
>
> > Have I competely missed something, the kernel already takes care of
> > this and I have the problem all wrong?
>
> You have it pretty much right. We have several time sources on a PC -
> the rtc (variable rate, not always present), the cmos clock (low res and
> on many modern machines horribly inaccurate due to the use of low grade
> components), the acpi timers (on newer machines only, high resolution
> constant rate, unknown accuracy).
I rather thought that since it runs at exactly 3 times the PIC clock
rate that it used the same "rock". Andrew, any thoughts here?
>
> ACPI may help here but lots of vendors implement their ACPI subsystem using
> I/O cycles to jump into SMM mode so its game over again.
>
> > This problem also comes up with IDE access with dma off and I've
> > seen reports of it when using frame buffers.
>
> The frame buffer one is fixed for newer kernels. The IDE one is a physical
> constraint on some older IDE controllers. See man hdparm.
>
> Alan
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
George george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/
next prev parent reply other threads:[~2002-02-16 19:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-16 15:16 Missed jiffies Tyson D Sawyer
2002-02-16 16:05 ` george anzinger
2002-02-16 16:14 ` yodaiken
2002-02-16 17:11 ` Alan Cox
2002-02-17 2:18 ` disregard lee johnson
2002-02-17 22:48 ` Missed jiffies H. Peter Anvin
2002-02-18 19:04 ` george anzinger
2002-02-18 19:22 ` H. Peter Anvin
2002-02-18 19:33 ` Alan Cox
[not found] ` <a4pbvi@cesium.transmeta.com>
2002-02-19 9:30 ` Pavel Machek
2002-02-19 20:23 ` H. Peter Anvin
2002-02-16 16:46 ` Alan Cox
2002-02-16 18:44 ` Eric W. Biederman
2002-02-16 19:02 ` george anzinger [this message]
2002-02-19 9:25 ` Pavel Machek
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=3C6EACBD.A380D235@mvista.com \
--to=george@mvista.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrew.grover@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tyson@rwii.com \
/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