From: Joe Korty <joe.korty@ccur.com>
To: P@draigBrady.com
Cc: Jonathan Lundell <linux@lundell-bros.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: x86 TSC time warp puzzle
Date: Mon, 4 Apr 2005 09:58:16 -0400 [thread overview]
Message-ID: <20050404135816.GA2876@tsunami.ccur.com> (raw)
In-Reply-To: <425101EA.7080001@draigBrady.com>
On Mon, Apr 04, 2005 at 09:59:22AM +0100, P@draigBrady.com wrote:
> Jonathan Lundell wrote:
> >Well, not actually a time warp, though it feels like one.
> >
> >I'm doing some real-time bit-twiddling in a driver, using the TSC to
> >measure out delays on the order of hundreds of nanoseconds. Because I
> >want an upper limit on the delay, I disable interrupts around it.
> >
> >The logic is something like:
> >
> > local_irq_save
> > out(set a bit)
> > t0 = TSC
> > wait while (t = (TSC - t0)) < delay_time
> > out(clear the bit)
> > local_irq_restore
> >
> > From time to time, when I exit the delay, t is *much* bigger than
> >delay_time. If delay_time is, say, 300ns, t is usually no more than
> >325ns. But every so often, t can be 2000, or 10000, or even much higher.
> >
> >The value of t seems to depend on the CPU involved, The worst case is
> >with an Intel 915GV chipset, where t approaches 500 microseconds (!).
Add nmi_watchdog=0 to your boot command line.
next prev parent reply other threads:[~2005-04-04 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-02 1:43 x86 TSC time warp puzzle Jonathan Lundell
2005-04-04 8:59 ` P
2005-04-04 13:58 ` Joe Korty [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-02 7:05 Pallipadi, Venkatesh
2005-04-02 8:13 ` Lee Revell
2005-04-03 4:04 ` Jonathan Lundell
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=20050404135816.GA2876@tsunami.ccur.com \
--to=joe.korty@ccur.com \
--cc=P@draigBrady.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@lundell-bros.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