From: George Anzinger <george@mvista.com>
To: Anton Blanchard <anton@samba.org>
Cc: john stultz <johnstul@us.ibm.com>,
David Vrabel <dvrabel@arcom.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
mann@vmware.com
Subject: Re: Jiffy based timers/timeouts can expire too soon.
Date: Thu, 16 Dec 2004 12:38:22 -0800 [thread overview]
Message-ID: <41C1F23E.9020006@mvista.com> (raw)
In-Reply-To: <20041202232803.GA6387@krispykreme.ozlabs.ibm.com>
Anton Blanchard wrote:
>
>
>>Well, hopefully the lost tick detection code won't over compensate, so
>>it shouldn't be an issue. However, as Tim Mann pointed out it, due to
>>interrupt delay and queuing, it is seen on virtualized systems.
>
>
> We saw this on ppc64 on earlier 2.6 kernels. There were some bugs with
> the VM where interrupts would get disabled for a long time (we saw 20+
> second periods). A SCSI timeout would occur on another CPU and at that
> time irqs would get reenabled and 20 seconds of time would get replayed.
>
> A bunch of timers would go off early and the SCSI adapter would explode.
The problem is that "most" code believes jiffies is right. Under long interrupt
off times, it is not. I suspect that most of the early timers came from code
that set the timer with the interrupt system off. Some might say they got what
they deserved :).
In the HRT patch, we always correct jiffies to the real value (by marking the
TSC value at the last jiffie push and using that plus the current TSC to
correct). It would be rather easy to provide an interface to get the current
real current jiffie, but it is another thing to correct all the code that uses
jiffie. Attempts to make jiffie a macro pick up far too many uses of the word
in several name spaces to make it a reasonable thing to do.
-
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
prev parent reply other threads:[~2004-12-16 20:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 16:05 Jiffy based timers/timeouts can expire too soon David Vrabel
2004-12-02 16:35 ` Chris Friesen
2004-12-02 18:47 ` john stultz
2004-12-02 23:28 ` Anton Blanchard
2004-12-16 20:38 ` George Anzinger [this message]
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=41C1F23E.9020006@mvista.com \
--to=george@mvista.com \
--cc=anton@samba.org \
--cc=dvrabel@arcom.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mann@vmware.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