All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] puzzled: running switchtest improves latency figures permanently
       [not found] <DC570CF5-F540-40FB-B313-596AF53EDDA2@mah.priv.at>
@ 2013-02-13  9:26 ` Michael Haberler
  2013-02-13  9:49   ` Henri Roosen
  2013-02-13 11:53   ` Gilles Chanteperdrix
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Haberler @ 2013-02-13  9:26 UTC (permalink / raw)
  To: xenomai; +Cc: Schooner, sam sokolik, John Morris


We have a report from 'the field' which we cannot make sense of.

The situation:
- an AMD board: http://www.asus.com/Motherboard/F1A75M_PRO 
- dmesg post boot: http://pastebin.com/38XrxNBy
- xeno-regression-test runs well, max 32us jitter
- John's Xenomai kernel packages:  3.5.7/2.6.2.1 [1]
- a native-skin userland RT threads application (linuxcnc[3])
 - 2 threads
 - jitter measured with its own GUI application 'latency-test'
 - successfully tested on several other platforms


what we observed:

1. Problem behaviour
---------------------
- boot
- run LinuxCNC latency-test
- observe massive spikes in latency
 - >100uS on a 25uS thread!
 - http://static.mah.priv.at/public/latency/skunkworks-unprimed.png

now any of 2), 3) or 4) improve latency:

2. run switchtest:  temporary change
------------------------------------
- while still running LinuxCNC latency-test from 1) above,
- running "/usr/lib/xenomai/testsuite/switchtest -s 1000" in a separate
window
- hit 'Reset Statistics' on the latency-test window
- max latency drops massively
- see http://static.mah.priv.at/public/latency/skunkworks-primed.png [3]
- ^C-ing out of the switchtest makes latency rise again


3. running a trivial shell script:  temporary change during script execution
----------------------------------------------------------------------------
- reboot
- run latency-test, again observe latency spikes
- in a separate window, run:
 - while true; do echo "nothing" > /dev/null; done
- again, latency-test shows rather low latency figures after hitting
'reset statistics' *as long as the above script is running*
- quote from Sam: "BTW - I ran the latency-test all night with the donothing scrip and it peaked at about 19.6us latency."
- killing the script makes the latency spikes reappear.


4. running xeno-regression-test and breaking out: permanent drop in latency
--------------------------------------------------------------------------
- reboot
- run latency-test, again observe latency spikes
- in a separate window, run:
  sudo xeno-regression-test -l "/usr/lib/xenomai/testsuite/dohell -m /tmp 100 " -t 2
- latency drops 
- the key observation: if you break by ^C out of xeno-regression-test, *latency
figures remain low*
- note that breaking out of xeno-regression-test left some processes running, obviously dd and ls:  http://pastebin.ca/2313116 
- once these processes complete ( http://pastebin.ca/2313117) latency goes up again.

second data point:
we have a report from another user, same kernel, Intel Q8200 Quad core board, which confirms 'dohell 900' in a separate window does drop latency significantly. This suggests it might not board specific.


This leaves us puzzled as to the causality here. We would really like to get rid of the latency spikes, but the shell script approach isnt appealing.

Any suggestions?

- Michael, Sam, John

----

[1] Config:
http://www.zultron.com/static/2013/01/xenomai/3.5.7-test-32-bit/config-3.5.7.txt
PPA info:  http://wiki.linuxcnc.org/cgi-bin/wiki.pl?XenomaiKernelPackages

[2] this screenshot was taken before we isolated the improvement to
running switchtest -s 1000; before we had used 'sudo
xeno-regression-test -l "/usr/lib/xenomai/testsuite/dohell -m /tmp 100"
-t 2' and it was observed that breaking out of the test with ^C towards
its end improves latency.

[3] the logic in essence follows trivial-periodic.c. While I have not
separated out the test into a simple program, this is certainly doable
if required.







^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai] puzzled: running switchtest improves latency figures permanently
  2013-02-13  9:26 ` [Xenomai] puzzled: running switchtest improves latency figures permanently Michael Haberler
@ 2013-02-13  9:49   ` Henri Roosen
  2013-02-13 10:01     ` Jan Kiszka
  2013-02-13 11:53   ` Gilles Chanteperdrix
  1 sibling, 1 reply; 8+ messages in thread
From: Henri Roosen @ 2013-02-13  9:49 UTC (permalink / raw)
  To: Michael Haberler; +Cc: Schooner, sam sokolik, John Morris, xenomai

On Wed, Feb 13, 2013 at 10:26 AM, Michael Haberler <mail17@mah.priv.at>wrote:

>
> We have a report from 'the field' which we cannot make sense of.
>
> The situation:
> - an AMD board: http://www.asus.com/Motherboard/F1A75M_PRO
> - dmesg post boot: http://pastebin.com/38XrxNBy
> - xeno-regression-test runs well, max 32us jitter
> - John's Xenomai kernel packages:  3.5.7/2.6.2.1 [1]
> - a native-skin userland RT threads application (linuxcnc[3])
>  - 2 threads
>  - jitter measured with its own GUI application 'latency-test'
>  - successfully tested on several other platforms
>
>
> what we observed:
>
> 1. Problem behaviour
> ---------------------
> - boot
> - run LinuxCNC latency-test
> - observe massive spikes in latency
>  - >100uS on a 25uS thread!
>  - http://static.mah.priv.at/public/latency/skunkworks-unprimed.png
>
> now any of 2), 3) or 4) improve latency:
>
> 2. run switchtest:  temporary change
> ------------------------------------
> - while still running LinuxCNC latency-test from 1) above,
> - running "/usr/lib/xenomai/testsuite/switchtest -s 1000" in a separate
> window
> - hit 'Reset Statistics' on the latency-test window
> - max latency drops massively
> - see http://static.mah.priv.at/public/latency/skunkworks-primed.png [3]
> - ^C-ing out of the switchtest makes latency rise again
>
>
> 3. running a trivial shell script:  temporary change during script
> execution
>
> ----------------------------------------------------------------------------
> - reboot
> - run latency-test, again observe latency spikes
> - in a separate window, run:
>  - while true; do echo "nothing" > /dev/null; done
> - again, latency-test shows rather low latency figures after hitting
> 'reset statistics' *as long as the above script is running*
> - quote from Sam: "BTW - I ran the latency-test all night with the
> donothing scrip and it peaked at about 19.6us latency."
> - killing the script makes the latency spikes reappear.
>
>
> 4. running xeno-regression-test and breaking out: permanent drop in latency
> --------------------------------------------------------------------------
> - reboot
> - run latency-test, again observe latency spikes
> - in a separate window, run:
>   sudo xeno-regression-test -l "/usr/lib/xenomai/testsuite/dohell -m /tmp
> 100 " -t 2
> - latency drops
> - the key observation: if you break by ^C out of xeno-regression-test,
> *latency
> figures remain low*
> - note that breaking out of xeno-regression-test left some processes
> running, obviously dd and ls:  http://pastebin.ca/2313116
> - once these processes complete ( http://pastebin.ca/2313117) latency
> goes up again.
>
> second data point:
> we have a report from another user, same kernel, Intel Q8200 Quad core
> board, which confirms 'dohell 900' in a separate window does drop latency
> significantly. This suggests it might not board specific.
>
>
> This leaves us puzzled as to the causality here. We would really like to
> get rid of the latency spikes, but the shell script approach isnt appealing.
>
> Any suggestions?
>

I've seen similar behaviour. In my case it had to do with the latency of
transitions of the cpu's idle states. The problem was worked around by
providing "nohlt idle=poll". I'm sure it is documented somewhere on the
xenomai website too.

Hope this helps,
Henri.


>
> - Michael, Sam, John
>
> ----
>
> [1] Config:
>
> http://www.zultron.com/static/2013/01/xenomai/3.5.7-test-32-bit/config-3.5.7.txt
> PPA info:  http://wiki.linuxcnc.org/cgi-bin/wiki.pl?XenomaiKernelPackages
>
> [2] this screenshot was taken before we isolated the improvement to
> running switchtest -s 1000; before we had used 'sudo
> xeno-regression-test -l "/usr/lib/xenomai/testsuite/dohell -m /tmp 100"
> -t 2' and it was observed that breaking out of the test with ^C towards
> its end improves latency.
>
> [3] the logic in essence follows trivial-periodic.c. While I have not
> separated out the test into a simple program, this is certainly doable
> if required.
>
>
>
>
>
>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai] puzzled: running switchtest improves latency figures permanently
  2013-02-13  9:49   ` Henri Roosen
@ 2013-02-13 10:01     ` Jan Kiszka
  2013-02-13 10:06       ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2013-02-13 10:01 UTC (permalink / raw)
  To: Henri Roosen, Michael Haberler
  Cc: Schooner, sam sokolik, John Morris, xenomai

On 2013-02-13 10:49, Henri Roosen wrote:
> On Wed, Feb 13, 2013 at 10:26 AM, Michael Haberler <mail17@mah.priv.at>wrote:
> 
>>
>> We have a report from 'the field' which we cannot make sense of.
>>
>> The situation:
>> - an AMD board: http://www.asus.com/Motherboard/F1A75M_PRO
>> - dmesg post boot: http://pastebin.com/38XrxNBy
>> - xeno-regression-test runs well, max 32us jitter
>> - John's Xenomai kernel packages:  3.5.7/2.6.2.1 [1]
>> - a native-skin userland RT threads application (linuxcnc[3])
>>  - 2 threads
>>  - jitter measured with its own GUI application 'latency-test'
>>  - successfully tested on several other platforms
>>
>>
>> what we observed:
>>
>> 1. Problem behaviour
>> ---------------------
>> - boot
>> - run LinuxCNC latency-test
>> - observe massive spikes in latency
>>  - >100uS on a 25uS thread!
>>  - http://static.mah.priv.at/public/latency/skunkworks-unprimed.png
>>
>> now any of 2), 3) or 4) improve latency:
>>
>> 2. run switchtest:  temporary change
>> ------------------------------------
>> - while still running LinuxCNC latency-test from 1) above,
>> - running "/usr/lib/xenomai/testsuite/switchtest -s 1000" in a separate
>> window
>> - hit 'Reset Statistics' on the latency-test window
>> - max latency drops massively
>> - see http://static.mah.priv.at/public/latency/skunkworks-primed.png [3]
>> - ^C-ing out of the switchtest makes latency rise again
>>
>>
>> 3. running a trivial shell script:  temporary change during script
>> execution
>>
>> ----------------------------------------------------------------------------
>> - reboot
>> - run latency-test, again observe latency spikes
>> - in a separate window, run:
>>  - while true; do echo "nothing" > /dev/null; done
>> - again, latency-test shows rather low latency figures after hitting
>> 'reset statistics' *as long as the above script is running*
>> - quote from Sam: "BTW - I ran the latency-test all night with the
>> donothing scrip and it peaked at about 19.6us latency."
>> - killing the script makes the latency spikes reappear.
>>
>>
>> 4. running xeno-regression-test and breaking out: permanent drop in latency
>> --------------------------------------------------------------------------
>> - reboot
>> - run latency-test, again observe latency spikes
>> - in a separate window, run:
>>   sudo xeno-regression-test -l "/usr/lib/xenomai/testsuite/dohell -m /tmp
>> 100 " -t 2
>> - latency drops
>> - the key observation: if you break by ^C out of xeno-regression-test,
>> *latency
>> figures remain low*
>> - note that breaking out of xeno-regression-test left some processes
>> running, obviously dd and ls:  http://pastebin.ca/2313116
>> - once these processes complete ( http://pastebin.ca/2313117) latency
>> goes up again.
>>
>> second data point:
>> we have a report from another user, same kernel, Intel Q8200 Quad core
>> board, which confirms 'dohell 900' in a separate window does drop latency
>> significantly. This suggests it might not board specific.
>>
>>
>> This leaves us puzzled as to the causality here. We would really like to
>> get rid of the latency spikes, but the shell script approach isnt appealing.
>>
>> Any suggestions?
>>
> 
> I've seen similar behaviour. In my case it had to do with the latency of
> transitions of the cpu's idle states. The problem was worked around by
> providing "nohlt idle=poll". I'm sure it is documented somewhere on the
> xenomai website too.

That will burn quite a bit of power, though. Maybe there is some BIOS
switch to relax power saving mode a bit without giving up on halt. Also,
do you see the same effect in text mode?

In any case, confirming the latency source via the ipipe tracer is a
good first step: http://xenomai.org/index.php/I-pipe:Tracer. You could
programmaticly break the trace once you detect the spike in your
program. Post the resulting trace here for public discussion.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai] puzzled: running switchtest improves latency figures permanently
  2013-02-13 10:01     ` Jan Kiszka
@ 2013-02-13 10:06       ` Jan Kiszka
  2013-02-13 11:55         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2013-02-13 10:06 UTC (permalink / raw)
  To: Henri Roosen, Michael Haberler
  Cc: Schooner, sam sokolik, John Morris, xenomai

On 2013-02-13 11:01, Jan Kiszka wrote:
> On 2013-02-13 10:49, Henri Roosen wrote:
>> On Wed, Feb 13, 2013 at 10:26 AM, Michael Haberler <mail17@mah.priv.at>wrote:
>>
>>>
>>> We have a report from 'the field' which we cannot make sense of.
>>>
>>> The situation:
>>> - an AMD board: http://www.asus.com/Motherboard/F1A75M_PRO
>>> - dmesg post boot: http://pastebin.com/38XrxNBy
>>> - xeno-regression-test runs well, max 32us jitter
>>> - John's Xenomai kernel packages:  3.5.7/2.6.2.1 [1]
>>> - a native-skin userland RT threads application (linuxcnc[3])
>>>  - 2 threads
>>>  - jitter measured with its own GUI application 'latency-test'
>>>  - successfully tested on several other platforms
>>>
>>>
>>> what we observed:
>>>
>>> 1. Problem behaviour
>>> ---------------------
>>> - boot
>>> - run LinuxCNC latency-test
>>> - observe massive spikes in latency
>>>  - >100uS on a 25uS thread!
>>>  - http://static.mah.priv.at/public/latency/skunkworks-unprimed.png
>>>
>>> now any of 2), 3) or 4) improve latency:
>>>
>>> 2. run switchtest:  temporary change
>>> ------------------------------------
>>> - while still running LinuxCNC latency-test from 1) above,
>>> - running "/usr/lib/xenomai/testsuite/switchtest -s 1000" in a separate
>>> window
>>> - hit 'Reset Statistics' on the latency-test window
>>> - max latency drops massively
>>> - see http://static.mah.priv.at/public/latency/skunkworks-primed.png [3]
>>> - ^C-ing out of the switchtest makes latency rise again
>>>
>>>
>>> 3. running a trivial shell script:  temporary change during script
>>> execution
>>>
>>> ----------------------------------------------------------------------------
>>> - reboot
>>> - run latency-test, again observe latency spikes
>>> - in a separate window, run:
>>>  - while true; do echo "nothing" > /dev/null; done
>>> - again, latency-test shows rather low latency figures after hitting
>>> 'reset statistics' *as long as the above script is running*
>>> - quote from Sam: "BTW - I ran the latency-test all night with the
>>> donothing scrip and it peaked at about 19.6us latency."
>>> - killing the script makes the latency spikes reappear.
>>>
>>>
>>> 4. running xeno-regression-test and breaking out: permanent drop in latency
>>> --------------------------------------------------------------------------
>>> - reboot
>>> - run latency-test, again observe latency spikes
>>> - in a separate window, run:
>>>   sudo xeno-regression-test -l "/usr/lib/xenomai/testsuite/dohell -m /tmp
>>> 100 " -t 2
>>> - latency drops
>>> - the key observation: if you break by ^C out of xeno-regression-test,
>>> *latency
>>> figures remain low*
>>> - note that breaking out of xeno-regression-test left some processes
>>> running, obviously dd and ls:  http://pastebin.ca/2313116
>>> - once these processes complete ( http://pastebin.ca/2313117) latency
>>> goes up again.
>>>
>>> second data point:
>>> we have a report from another user, same kernel, Intel Q8200 Quad core
>>> board, which confirms 'dohell 900' in a separate window does drop latency
>>> significantly. This suggests it might not board specific.
>>>
>>>
>>> This leaves us puzzled as to the causality here. We would really like to
>>> get rid of the latency spikes, but the shell script approach isnt appealing.
>>>
>>> Any suggestions?
>>>
>>
>> I've seen similar behaviour. In my case it had to do with the latency of
>> transitions of the cpu's idle states. The problem was worked around by
>> providing "nohlt idle=poll". I'm sure it is documented somewhere on the
>> xenomai website too.
> 
> That will burn quite a bit of power, though. Maybe there is some BIOS
> switch to relax power saving mode a bit without giving up on halt. Also,
> do you see the same effect in text mode?
> 
> In any case, confirming the latency source via the ipipe tracer is a
> good first step: http://xenomai.org/index.php/I-pipe:Tracer. You could
> programmaticly break the trace once you detect the spike in your
> program. Post the resulting trace here for public discussion.
> 
> Jan
> 

BTW, though unrelated to the latency issues: Running a 32-bit kernel on
a box with >1GB RAM is not a good choice, performance-wise. PAE is slow...

i386 is for low-end embedded only today. I'll continue testing it, but
it will surely receive less attention than x86-64, just like in mainline
Linux.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai] puzzled: running switchtest improves latency figures permanently
  2013-02-13  9:26 ` [Xenomai] puzzled: running switchtest improves latency figures permanently Michael Haberler
  2013-02-13  9:49   ` Henri Roosen
@ 2013-02-13 11:53   ` Gilles Chanteperdrix
  2013-02-13 14:35     ` Michael Haberler
  1 sibling, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2013-02-13 11:53 UTC (permalink / raw)
  To: Michael Haberler; +Cc: Schooner, sam sokolik, John Morris, xenomai

On 02/13/2013 10:26 AM, Michael Haberler wrote:

> 
> We have a report from 'the field' which we cannot make sense of.
> 
> The situation:
> - an AMD board: http://www.asus.com/Motherboard/F1A75M_PRO 
> - dmesg post boot: http://pastebin.com/38XrxNBy
> - xeno-regression-test runs well, max 32us jitter


Please do not rely on latency results with xeno-regression-test,
switchtest artificially increases latencies by locking the scheduler.
The tool to make latency benchmarks is xeno-test.

> what we observed:
> 
> 1. Problem behaviour
> ---------------------
> - boot
> - run LinuxCNC latency-test
> - observe massive spikes in latency
>  - >100uS on a 25uS thread!
>  - http://static.mah.priv.at/public/latency/skunkworks-unprimed.png


Do you get the same results with Xenomai latency test?

> now any of 2), 3) or 4) improve latency:
> - running "/usr/lib/xenomai/testsuite/switchtest -s 1000" in a separate

>  - while true; do echo "nothing" > /dev/null; done

> - the key observation: if you break by ^C out of xeno-regression-test, *latency
> figures remain low*
> - note that breaking out of xeno-regression-test left some processes running, obviously dd and ls:  http://pastebin.ca/2313116 


Yes, that is a known behaviour of dohell. Fixing this in a manner
portable accross various shell implementations proved to be a task not
as easy as it seems. So, for the sake of simplicity, we simply ignore
the problem, xeno-regression-test or xeno-test are meant to be run not
very often, so a reboot after running them, or manually kill the task is
not much of an issue.

> Any suggestions?


You have an issue with the idle loop. The three cases you mention cause
the Linux kernel never to use the idle loop:
- switchtest run with the -s argument as a (non real-time) loop
occupying 100% of the CPU.
- the shell loop does the same
- running dohell does the same.


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai] puzzled: running switchtest improves latency figures permanently
  2013-02-13 10:06       ` Jan Kiszka
@ 2013-02-13 11:55         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2013-02-13 11:55 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Schooner, sam sokolik, John Morris, xenomai

On 02/13/2013 11:06 AM, Jan Kiszka wrote:

> On 2013-02-13 11:01, Jan Kiszka wrote:
>> On 2013-02-13 10:49, Henri Roosen wrote:
>>> On Wed, Feb 13, 2013 at 10:26 AM, Michael Haberler <mail17@mah.priv.at>wrote:
>>>
>>>>
>>>> We have a report from 'the field' which we cannot make sense of.
>>>>
>>>> The situation:
>>>> - an AMD board: http://www.asus.com/Motherboard/F1A75M_PRO
>>>> - dmesg post boot: http://pastebin.com/38XrxNBy
>>>> - xeno-regression-test runs well, max 32us jitter
>>>> - John's Xenomai kernel packages:  3.5.7/2.6.2.1 [1]
>>>> - a native-skin userland RT threads application (linuxcnc[3])
>>>>  - 2 threads
>>>>  - jitter measured with its own GUI application 'latency-test'
>>>>  - successfully tested on several other platforms
>>>>
>>>>
>>>> what we observed:
>>>>
>>>> 1. Problem behaviour
>>>> ---------------------
>>>> - boot
>>>> - run LinuxCNC latency-test
>>>> - observe massive spikes in latency
>>>>  - >100uS on a 25uS thread!
>>>>  - http://static.mah.priv.at/public/latency/skunkworks-unprimed.png
>>>>
>>>> now any of 2), 3) or 4) improve latency:
>>>>
>>>> 2. run switchtest:  temporary change
>>>> ------------------------------------
>>>> - while still running LinuxCNC latency-test from 1) above,
>>>> - running "/usr/lib/xenomai/testsuite/switchtest -s 1000" in a separate
>>>> window
>>>> - hit 'Reset Statistics' on the latency-test window
>>>> - max latency drops massively
>>>> - see http://static.mah.priv.at/public/latency/skunkworks-primed.png [3]
>>>> - ^C-ing out of the switchtest makes latency rise again
>>>>
>>>>
>>>> 3. running a trivial shell script:  temporary change during script
>>>> execution
>>>>
>>>> ----------------------------------------------------------------------------
>>>> - reboot
>>>> - run latency-test, again observe latency spikes
>>>> - in a separate window, run:
>>>>  - while true; do echo "nothing" > /dev/null; done
>>>> - again, latency-test shows rather low latency figures after hitting
>>>> 'reset statistics' *as long as the above script is running*
>>>> - quote from Sam: "BTW - I ran the latency-test all night with the
>>>> donothing scrip and it peaked at about 19.6us latency."
>>>> - killing the script makes the latency spikes reappear.
>>>>
>>>>
>>>> 4. running xeno-regression-test and breaking out: permanent drop in latency
>>>> --------------------------------------------------------------------------
>>>> - reboot
>>>> - run latency-test, again observe latency spikes
>>>> - in a separate window, run:
>>>>   sudo xeno-regression-test -l "/usr/lib/xenomai/testsuite/dohell -m /tmp
>>>> 100 " -t 2
>>>> - latency drops
>>>> - the key observation: if you break by ^C out of xeno-regression-test,
>>>> *latency
>>>> figures remain low*
>>>> - note that breaking out of xeno-regression-test left some processes
>>>> running, obviously dd and ls:  http://pastebin.ca/2313116
>>>> - once these processes complete ( http://pastebin.ca/2313117) latency
>>>> goes up again.
>>>>
>>>> second data point:
>>>> we have a report from another user, same kernel, Intel Q8200 Quad core
>>>> board, which confirms 'dohell 900' in a separate window does drop latency
>>>> significantly. This suggests it might not board specific.
>>>>
>>>>
>>>> This leaves us puzzled as to the causality here. We would really like to
>>>> get rid of the latency spikes, but the shell script approach isnt appealing.
>>>>
>>>> Any suggestions?
>>>>
>>>
>>> I've seen similar behaviour. In my case it had to do with the latency of
>>> transitions of the cpu's idle states. The problem was worked around by
>>> providing "nohlt idle=poll". I'm sure it is documented somewhere on the
>>> xenomai website too.
>>
>> That will burn quite a bit of power, though. Maybe there is some BIOS
>> switch to relax power saving mode a bit without giving up on halt. Also,
>> do you see the same effect in text mode?
>>
>> In any case, confirming the latency source via the ipipe tracer is a
>> good first step: http://xenomai.org/index.php/I-pipe:Tracer. You could
>> programmaticly break the trace once you detect the spike in your
>> program. Post the resulting trace here for public discussion.
>>
>> Jan
>>
> 
> BTW, though unrelated to the latency issues: Running a 32-bit kernel on
> a box with >1GB RAM is not a good choice, performance-wise. PAE is slow...
> 
> i386 is for low-end embedded only today. I'll continue testing it, but
> it will surely receive less attention than x86-64, just like in mainline
> Linux.


I can continue running xeno-regression-test on geode and duall piii for
the I-pipe releases as I did up to now.


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai] puzzled: running switchtest improves latency figures permanently
  2013-02-13 11:53   ` Gilles Chanteperdrix
@ 2013-02-13 14:35     ` Michael Haberler
  2013-02-13 19:39       ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Haberler @ 2013-02-13 14:35 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Schooner, sam sokolik, John Morris, xenomai

Henri, Jan, Gilles 

thanks for the quick and profound answers

results are just coming in from 'the field' (the problem cases are in the colonies and the folks over there are still working their coffee mugs ;-)

Am 13.02.2013 um 12:53 schrieb Gilles Chanteperdrix:

> Do you get the same results with Xenomai latency test?

yes, it is reproducible

this is for boot option "nohlt idle=poll" added: http://imagebin.org/246556
(here for the linuxcnc latency test:http://imagebin.org/246546)

this is without that option: http://imagebin.org/246550 - notice sudden 230uS spike

so I that takes the linuxcnc latency test out of the equation

>> Any suggestions?
> 
> 
> You have an issue with the idle loop. The three cases you mention cause
> the Linux kernel never to use the idle loop:
> - switchtest run with the -s argument as a (non real-time) loop
> occupying 100% of the CPU.
> - the shell loop does the same
> - running dohell does the same.

That makes sense.

Are there any specific knobs you'd suggest twisting?

--

thanks a lot! we already have a workaround based on Henri's suggestion; everything else is sugar on the cake

- Michael



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xenomai] puzzled: running switchtest improves latency figures permanently
  2013-02-13 14:35     ` Michael Haberler
@ 2013-02-13 19:39       ` Gilles Chanteperdrix
  0 siblings, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2013-02-13 19:39 UTC (permalink / raw)
  To: Michael Haberler; +Cc: Schooner, sam sokolik, John Morris, xenomai

On 02/13/2013 03:35 PM, Michael Haberler wrote:

> Are there any specific knobs you'd suggest twisting?


You have to configure what should happen when Linux is idle. You can
change what Linux does when idle, by using the kernel command line
parameters as Henri told you, or you may be able to configure what the
processor does when idle. This may be possible from the BIOS menu, or
alternatively with special tools which can be loaded by the boot-loader
before Linux. On Intel processors, such a tool is Intel BIOS
Implementation Test suite:

http://biosbits.org/

I do not know about AMD processors.

Regards.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-13 19:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <DC570CF5-F540-40FB-B313-596AF53EDDA2@mah.priv.at>
2013-02-13  9:26 ` [Xenomai] puzzled: running switchtest improves latency figures permanently Michael Haberler
2013-02-13  9:49   ` Henri Roosen
2013-02-13 10:01     ` Jan Kiszka
2013-02-13 10:06       ` Jan Kiszka
2013-02-13 11:55         ` Gilles Chanteperdrix
2013-02-13 11:53   ` Gilles Chanteperdrix
2013-02-13 14:35     ` Michael Haberler
2013-02-13 19:39       ` Gilles Chanteperdrix

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.