From: Sebastian Smolorz <smolorz@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "Jan Kiszka" <jan.kiszka@domain.hid>,
xenomai-core <xenomai@xenomai.org>,
"Cornelius Köpp" <Cornelius.Koepp@domain.hid>
Subject: Re: [Xenomai-core] latencys drifting into negative (Xenomai 2.4.2/2.4.3)
Date: Wed, 02 Apr 2008 17:28:00 +0200 [thread overview]
Message-ID: <47F3A600.2050308@domain.hid> (raw)
In-Reply-To: <47F38365.8070008@domain.hid>
Sebastian Smolorz wrote:
> Gilles Chanteperdrix wrote:
>> On Wed, Apr 2, 2008 at 2:28 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>>> Sebastian Smolorz wrote:
>>> > Jan Kiszka wrote:
>>> >>
>>> >> 2.3.x did not incorporate the new TSC-to-ns conversion. Maybe it is
>>> >> not a PIC vs. APIC thing, but rather a rounding problem of larger TSC
>>> >> values (that naturally show up when the system runs for a longer time).
>>> >
>>> > This hint seems to point into the right direction. I tried out a
>>> > modified pod_32.h (xnarch_tsc_to_ns() commented out) so that the old
>>> > implementation in include/asm-generic/bits/pod.h was used. The drifting
>>> > bug disappeared. So there seems so be a buggy x86-specific
>>> > implementation of this routine.
>>>
>>> Hmm, maybe even a conceptional issue: the multiply-shift-based
>>> xnarch_tsc_to_ns is not as precise as the still multiply-divide-based
>>> xnarch_ns_to_tsc. So when converting from tsc over ns back to tsc, we
>>> may loose some bits, maybe too many bits...
>> If you want to know whether llmulshft implementation is broken on x86
>> or if there is a design issue, you can attempt to use the generic
>> implementation on x86.
>>
>
> You mean not using rthal_llmulshft() in arith_32.h and instead using
> __rthal_generic_llmulshft()? I tried this and it's also suffering from
> the drift although it seems that the drift per time unit is smaller in
> the generic case.
This was a subjective impression, the drift caused by rthal_llmulshft()
and __rthal_generic_llmulshft() is the same.
> I will try to get some numbers to compare the values
> returned from rthal_llmulshft(), __rthal_generic_llmulshft() and
> __rthal_generic_ullimd().
>
Here are some results. The latency test run one hour and 46 minutes
(kernel mode). I measured the difference between the return value of the
routine __rthal_generic_ullimd() which I considered as right and the
return value of rthal_llmulshft(). This difference increases over time.
At start: 21 ns
After 1 minute: 50 ns
After 4 minutes: 132 ns
After 8 minutes: 238 ns
After 86 minutes: 2342 ns
The higher the TSC value the bigger the error during the conversion of
the TSC value to nanoseconds. The converted value is too small. This all
explains why latency reports decreasing values over time.
Houston, we have a problem.
--
Sebastian
next prev parent reply other threads:[~2008-04-02 15:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 23:26 [Xenomai-core] latencys drifting into negative (Xenomai 2.4.2/2.4.3) Cornelius Köpp
2008-04-02 3:01 ` Tomas Kalibera
2008-04-02 9:04 ` Jan Kiszka
2008-04-02 12:00 ` Sebastian Smolorz
2008-04-02 12:28 ` Jan Kiszka
2008-04-02 12:46 ` Gilles Chanteperdrix
2008-04-02 13:00 ` Sebastian Smolorz
2008-04-02 15:28 ` Sebastian Smolorz [this message]
2008-04-02 15:58 ` Sebastian Smolorz
2008-04-02 16:05 ` Gilles Chanteperdrix
2008-04-02 16:24 ` Sebastian Smolorz
2008-04-03 12:17 ` Jan Kiszka
2008-04-03 12:27 ` Gilles Chanteperdrix
2008-04-03 12:50 ` Jan Kiszka
2008-04-03 12:52 ` Gilles Chanteperdrix
2008-04-03 13:15 ` Sebastian Smolorz
2008-04-03 21:52 ` Jan Kiszka
2008-04-04 8:23 ` Sebastian Smolorz
2008-04-04 10:45 ` Jan Kiszka
2008-04-04 13:18 ` Gilles Chanteperdrix
2008-04-04 13:25 ` Jan Kiszka
2008-04-04 13:32 ` Jan Kiszka
2008-04-04 13:32 ` Gilles Chanteperdrix
2008-04-04 13:57 ` Jan Kiszka
2008-04-04 14:09 ` Gilles Chanteperdrix
2008-04-04 14:33 ` Jan Kiszka
2008-04-04 15:48 ` Gilles Chanteperdrix
2008-04-04 15:52 ` Philippe Gerum
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=47F3A600.2050308@domain.hid \
--to=smolorz@domain.hid \
--cc=Cornelius.Koepp@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.