From: Jan Kiszka <jan.kiszka@domain.hid>
To: "RAKOTOSALAMA, Nirilanto" <NIRILANTO.RAKOTOSALAMA@airbus.com>
Cc: xenomai@xenomai.org, rtnet-users@domain.hid
Subject: Re: [Xenomai-help] [RTnet-users] Time scale problem.
Date: Tue, 15 May 2007 11:52:13 +0200 [thread overview]
Message-ID: <464982CD.8010609@domain.hid> (raw)
In-Reply-To: <5C40CD1E4697424ABDE3AC57CF1B22C6032202BF@FR0-MAILMB20.res.airbus.corp>
[-- Attachment #1: Type: text/plain, Size: 2620 bytes --]
RAKOTOSALAMA, Nirilanto wrote:
>>> Hi Everyone
>>>
>>> I'm programming a little client-server application to test
>> network performances with xenomai 2.3.1 and rtnet 0.9.9.
>>> The 2 programs are based on the rtnet frag-ip example.
>>> The perdiodic scenario is :
>>> - RSG program sends a datagram to the REMOTE program which
>> was waiting.
>>> - REMOTE sends a response to RSG.
>>> - RSG simulates a CPU performing period using rt_timer_spin.
>>> This cycle should take less than 2.5ms.
>>>
>>> I observe strange time measurement :
>>>
>>> For example when I want to run during 10 secs : 1000 cycles of 10 ms
>>> The program calculates a time between 16 and 17 secs (using
>> rt_timer_tsc)
>>> But the effective elapsed time (i kept time with a chrono
>> :-s ) is around 10secs
>>
>> Before I start looking at details, please check the
>> consistency of your
>> local Xenomai clock with this brand new tool:
>>
>> http://svn.gna.org/viewcvs/xenomai/trunk/src/testsuite/clockte
>> st/clocktest.c?view=markup
>> (you don't have to switch to trunk, just grab the source and compile
>> manually)
>
> Ok I test it.
>
>> In case the Linux clock is not screwed up as well, you can check for
>> potential drifts and cross-cpu wraps that way.
>
> I have tested the clocktest on the 2 boxes (P4 1.7Ghz and P4 Xeon 1.7Ghz)
> (Note that on the 2 boxes, there's this 60% constant factor between effective
> and calculated time.
>
> on P4 :
> == Tested clock: 0 (CLOCK_REALTIME)
> CPU ToD offset [us] ToD drift [us/s] warps max delta [us]
> --- -------------------- ---------------- ---------- --------------
> 0 -592770.4 -0.210 0 0.0
> the drift stays between -0.200us and -0.210us
>
> on P4 Xeon :
> == Tested clock: 0 (CLOCK_REALTIME)
> CPU ToD offset [us] ToD drift [us/s] warps max delta [us]
> --- -------------------- ---------------- ---------- --------------
> 0 -17620.8 -0.053 0 0.0
> 1 -17620.8 -0.055 0 0.0
> the drift stays between -0.050us and -0.060us
Looks sane.
>
> Is it normal ? And sorry, but I don't understand what do you mean about "cross-cpu wraps that way" ?
That would mean that the TSCs of the SMP box are not in sync and may
cause jumps when migrating between the CPUs or comparing time stamps of
different origins.
Anyway, you issue requires a closer look at the code:
...
> rt_timer_ticks2ns(rt_timer_tsc())
Are you sure that ticks == tsc? RTFM :->
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
next prev parent reply other threads:[~2007-05-15 9:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 8:57 [Xenomai-help] [RTnet-users] Time scale problem RAKOTOSALAMA, Nirilanto
2007-05-15 9:52 ` Jan Kiszka [this message]
2007-05-15 10:00 ` Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2007-05-15 10:12 RAKOTOSALAMA, Nirilanto
2007-05-15 7:25 [Xenomai-help] " RAKOTOSALAMA, Nirilanto
2007-05-15 7:40 ` [Xenomai-help] [RTnet-users] " Jan Kiszka
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=464982CD.8010609@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=NIRILANTO.RAKOTOSALAMA@airbus.com \
--cc=rtnet-users@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.