* Re: [Xenomai-help] [RTnet-users] Time scale problem.
2007-05-15 7:25 [Xenomai-help] " RAKOTOSALAMA, Nirilanto
@ 2007-05-15 7:40 ` Jan Kiszka
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2007-05-15 7:40 UTC (permalink / raw)
To: RAKOTOSALAMA, Nirilanto; +Cc: xenomai, rtnet-users
[-- Attachment #1: Type: text/plain, Size: 1691 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/clocktest/clocktest.c?view=markup
(you don't have to switch to trunk, just grab the source and compile
manually)
In case the Linux clock is not screwed up as well, you can check for
potential drifts and cross-cpu wraps that way.
>
> When a cycle is supposed to be 5ms it is calculated to be 8.4ms
>
> When I want a rt_timer_spin of 0.750ms, result is a 1.27ms burning period.
>
> So a constant difference between effective and calculated time around +60%.
>
> Maybe there something wrong in my program but I don't know what.
> Also, I have read some threads that mentionned time problem and /proc/xenomai/latency value.
> I didn't understand everything.
> Any suggestion ?
>
>
> Thanks in advance.
>
> Niry
>
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Time scale problem.
@ 2007-05-15 8:57 RAKOTOSALAMA, Nirilanto
2007-05-15 9:52 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-15 8:57 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai, rtnet-users
> > 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
Is it normal ? And sorry, but I don't understand what do you mean about "cross-cpu wraps that way" ?
Thanks Jan.
> > When a cycle is supposed to be 5ms it is calculated to be 8.4ms
> >
> > When I want a rt_timer_spin of 0.750ms, result is a 1.27ms burning period.
> >
> > So a constant difference between effective and calculated time around +60%.
> >
> > Maybe there something wrong in my program but I don't know what.
> > Also, I have read some threads that mentionned time problem and /proc/xenomai/latency value.
> > I didn't understand everything.
> > Any suggestion ?
> >
> >
> > Thanks in advance.
> >
> > Niry
>
> Jan
Niry
This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it.
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Time scale problem.
2007-05-15 8:57 [Xenomai-help] [RTnet-users] Time scale problem RAKOTOSALAMA, Nirilanto
@ 2007-05-15 9:52 ` Jan Kiszka
2007-05-15 10:00 ` Gilles Chanteperdrix
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2007-05-15 9:52 UTC (permalink / raw)
To: RAKOTOSALAMA, Nirilanto; +Cc: xenomai, rtnet-users
[-- 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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Time scale problem.
2007-05-15 9:52 ` Jan Kiszka
@ 2007-05-15 10:00 ` Gilles Chanteperdrix
0 siblings, 0 replies; 5+ messages in thread
From: Gilles Chanteperdrix @ 2007-05-15 10:00 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai, RAKOTOSALAMA, Nirilanto, rtnet-users
Jan Kiszka wrote:
>>rt_timer_ticks2ns(rt_timer_tsc())
>
>
> Are you sure that ticks == tsc? RTFM :->
No, there was a change some (long) time ago, one should use
rt_timer_tsc2ns for converting tsc, not rt_timer_ticks2ns.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Time scale problem.
@ 2007-05-15 10:12 RAKOTOSALAMA, Nirilanto
0 siblings, 0 replies; 5+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-15 10:12 UTC (permalink / raw)
To: jan.kiszka; +Cc: xenomai, rtnet-users
> >>> 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.
Ok.
> > 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.
Thanks, it's more clear for me now.
> Anyway, you issue requires a closer look at the code:
>
> ...
> > rt_timer_ticks2ns(rt_timer_tsc())
>
> Are you sure that ticks == tsc? RTFM :->
Oh, what stupid I am !!! Sorry and thanks lot for your help.
I'm not yet a boss in using xenomai, but I'll work.
Thanks agin for your help.
Niry
This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it.
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-15 10:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15 8:57 [Xenomai-help] [RTnet-users] Time scale problem RAKOTOSALAMA, Nirilanto
2007-05-15 9:52 ` Jan Kiszka
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
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.