Xenomai for A13 - A10

Started by crubille, February 04, 2013, 10:55:17 PM

Previous topic - Next topic

Tele

Hi Crubille,

I compiled your last patch, and its working now. Woooot !

Here is the bootlog:

http://pastebin.com/02ktYhZa

I start testing it, then I report.

ehj666

Quote from: uMinded on February 28, 2013, 05:07:32 AM

git clone git://github.com/linux-sunxi/linux-sunxi.git -b sunxi-v3.4.24-r1

I get an error to the effect "version sunxi-v3.4.24-r1 does not exist, reverting to trunk". Doing
"git tag -l" clearly shows a version sunxi-v3.4.24-r1. I do not think I made a typo.

Tele

Quote from: ehj666 on February 28, 2013, 01:04:21 PM
Quote from: uMinded on February 28, 2013, 05:07:32 AM

git clone git://github.com/linux-sunxi/linux-sunxi.git -b sunxi-v3.4.24-r1

I get an error to the effect "version sunxi-v3.4.24-r1 does not exist, reverting to trunk". Doing
"git tag -l" clearly shows a version sunxi-v3.4.24-r1. I do not think I made a typo.

Yes but -b switch is seeking for a branch not a tag.

I dont use github, Im not sure about this, but try it in 2 steps:

git clone git://github.com/linux-sunxi/linux-sunxi.git linux-sunxi
cd ./linux-sunxi
git checkout sunxi-v3.4.24-r1



Instead of the above, I download the specific kernel tarball directly, I dont need the whole 1GB sunxi repository.

wget https://github.com/linux-sunxi/linux-sunxi/archive/sunxi-v3.4.24-r1.tar.gz
tar -xf sunxi-v3.4.24-r1.tar.gz

Tele

I have made my 1st tests with the brand new xenomai.

I skipped the "idle" tests, that test has no purpose for me. I loaded the Oli card with the stress application, I set 10 workers on processor test, other 10 workers on memory alloc/free. HTOP has shown 100% loaded procs, continously.


stress -m 10 --vm-bytes 5000 -c 10


Latency results:


root@sun5i># echo 10000 > /proc/xenomai/latency
root@sun5i># cat /proc/xenomai/latency
9999
root@sun5i># ./latency -p 100
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.499|      3.333|     20.416|       0|     0|      2.499|     20.416
RTD|      2.499|      3.208|     14.541|       0|     0|      2.499|     20.416
RTD|      2.499|      3.291|     16.541|       0|     0|      2.499|     20.416
RTD|      2.499|      3.249|     19.624|       0|     0|      2.499|     20.416
RTD|      2.499|      3.416|     17.666|       0|     0|      2.499|     20.416
RTD|      2.499|      3.249|     16.083|       0|     0|      2.499|     20.416
RTD|      2.541|      3.374|     21.749|       0|     0|      2.499|     21.749
RTD|      2.499|      3.166|     15.333|       0|     0|      2.499|     21.749
RTD|      2.499|      3.333|     16.291|       0|     0|      2.499|     21.749
RTD|      2.416|      3.291|     15.833|       0|     0|      2.416|     21.749
RTD|      2.249|      3.333|     18.416|       0|     0|      2.249|     21.749
RTD|      2.499|      3.249|     17.249|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     15.541|       0|     0|      2.249|     21.749
RTD|      2.499|      3.166|     15.999|       0|     0|      2.249|     21.749
RTD|      2.416|      3.374|     15.541|       0|     0|      2.249|     21.749
RTD|      2.416|      3.249|     17.499|       0|     0|      2.249|     21.749
RTD|      2.416|      3.374|     18.499|       0|     0|      2.249|     21.749
RTD|      2.499|      3.208|     13.166|       0|     0|      2.249|     21.749
RTD|      2.499|      3.291|     19.999|       0|     0|      2.249|     21.749
RTD|      2.499|      3.249|     17.874|       0|     0|      2.249|     21.749
RTD|      2.499|      3.374|     17.083|       0|     0|      2.249|     21.749
RTT|  00:00:22  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.499|      3.249|     20.416|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     15.833|       0|     0|      2.249|     21.749
RTD|      2.499|      3.166|     14.291|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     16.833|       0|     0|      2.249|     21.749
RTD|      2.333|      3.333|     15.541|       0|     0|      2.249|     21.749
RTD|      2.499|      3.291|     17.833|       0|     0|      2.249|     21.749
RTD|      2.499|      3.291|     15.416|       0|     0|      2.249|     21.749
RTD|      2.499|      3.249|     16.416|       0|     0|      2.249|     21.749
RTD|      2.499|      3.249|     18.833|       0|     0|      2.249|     21.749
RTD|      2.541|      3.374|     18.416|       0|     0|      2.249|     21.749
RTD|      2.499|      3.249|     14.749|       0|     0|      2.249|     21.749
RTD|      2.416|      3.291|     17.749|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     17.083|       0|     0|      2.249|     21.749
RTD|      2.333|      3.291|     16.083|       0|     0|      2.249|     21.749
RTD|      2.499|      3.208|     14.208|       0|     0|      2.249|     21.749
RTD|      2.499|      3.291|     16.916|       0|     0|      2.249|     21.749
RTD|      2.541|      3.333|     16.291|       0|     0|      2.249|     21.749
RTD|      2.416|      3.249|     14.666|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     17.541|       0|     0|      2.249|     21.749
RTD|      2.499|      3.208|     14.083|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     17.416|       0|     0|      2.249|     21.749
RTT|  00:00:43  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.499|      3.291|     17.083|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     18.833|       0|     0|      2.249|     21.749
RTD|      2.499|      3.208|     17.291|       0|     0|      2.249|     21.749
RTD|      2.499|      3.291|     16.624|       0|     0|      2.249|     21.749
RTD|      2.499|      3.291|     16.333|       0|     0|      2.249|     21.749
RTD|      2.499|      3.333|     16.916|       0|     0|      2.249|     21.749
RTD|      2.499|      3.208|     19.999|       0|     0|      2.249|     21.749
RTD|      2.499|      3.374|     15.624|       0|     0|      2.249|     21.749
RTD|      2.499|      3.249|     16.499|       0|     0|      2.249|     21.749
RTD|      2.499|      3.374|     16.416|       0|     0|      2.249|     21.749
RTD|      2.499|      3.249|     17.666|       0|     0|      2.249|     21.749
RTD|      2.291|      3.291|     17.166|       0|     0|      2.249|     21.749
RTD|      2.499|      3.208|     18.208|       0|     0|      2.249|     21.749
RTD|      2.499|      3.374|     17.958|       0|     0|      2.249|     21.749
RTD|      2.083|      3.291|     16.874|       0|     0|      2.083|     21.749
RTD|      2.499|      3.333|     17.166|       0|     0|      2.083|     21.749
RTD|      2.499|      3.208|     18.499|       0|     0|      2.083|     21.749
RTD|      2.333|      3.291|     17.291|       0|     0|      2.083|     21.749
RTD|      2.416|      3.249|     17.416|       0|     0|      2.083|     21.749
RTD|      2.541|      3.374|     16.499|       0|     0|      2.083|     21.749
RTD|      2.499|      3.249|     18.541|       0|     0|      2.083|     21.749
RTT|  00:01:04  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.499|      3.333|     16.333|       0|     0|      2.083|     21.749
RTD|      2.499|      3.166|     15.916|       0|     0|      2.083|     21.749
RTD|      2.333|      3.374|     18.541|       0|     0|      2.083|     21.749
RTD|      2.416|      3.249|     21.833|       0|     0|      2.083|     21.833
RTD|      2.499|      3.291|     13.624|       0|     0|      2.083|     21.833
RTD|      2.499|      3.249|     18.874|       0|     0|      2.083|     21.833
RTD|      2.416|      3.291|     15.416|       0|     0|      2.083|     21.833
RTD|      2.499|      3.291|     19.583|       0|     0|      2.083|     21.833
RTD|      2.499|      3.374|     16.999|       0|     0|      2.083|     21.833
RTD|      2.541|      3.208|     16.208|       0|     0|      2.083|     21.833
RTD|      2.166|      3.291|     17.291|       0|     0|      2.083|     21.833
RTD|      2.416|      3.291|     22.624|       0|     0|      2.083|     22.624
RTD|      2.499|      3.416|     19.916|       0|     0|      2.083|     22.624
RTD|      2.499|      3.249|     16.416|       0|     0|      2.083|     22.624
RTD|      2.499|      3.291|     16.083|       0|     0|      2.083|     22.624
RTD|      2.499|      3.208|     17.291|       0|     0|      2.083|     22.624
RTD|      2.291|      3.333|     16.208|       0|     0|      2.083|     22.624
RTD|      2.416|      3.333|     17.333|       0|     0|      2.083|     22.624
RTD|      2.499|      3.333|     17.208|       0|     0|      2.083|     22.624
RTD|      2.499|      3.249|     14.833|       0|     0|      2.083|     22.624
RTD|      2.499|      3.208|     16.874|       0|     0|      2.083|     22.624
RTT|  00:01:25  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.499|      3.291|     16.833|       0|     0|      2.083|     22.624
RTD|      2.499|      3.291|     14.541|       0|     0|      2.083|     22.624
RTD|      2.499|      3.333|     17.208|       0|     0|      2.083|     22.624
RTD|      2.499|      3.333|     18.583|       0|     0|      2.083|     22.624
RTD|      2.499|      3.249|     15.249|       0|     0|      2.083|     22.624
RTD|      2.499|      3.249|     14.249|       0|     0|      2.083|     22.624
RTD|      2.416|      3.333|     15.833|       0|     0|      2.083|     22.624
RTD|      2.416|      3.249|     15.083|       0|     0|      2.083|     22.624
RTD|      2.541|      3.333|     17.874|       0|     0|      2.083|     22.624
RTD|      2.416|      3.249|     16.291|       0|     0|      2.083|     22.624
RTD|      2.499|      3.333|     15.333|       0|     0|      2.083|     22.624
RTD|      2.499|      3.333|     17.166|       0|     0|      2.083|     22.624
RTD|      2.499|      3.291|     17.208|       0|     0|      2.083|     22.624
RTD|      2.499|      3.249|     17.833|       0|     0|      2.083|     22.624
RTD|      2.499|      3.333|     17.166|       0|     0|      2.083|     22.624
RTD|      2.416|      3.333|     19.541|       0|     0|      2.083|     22.624
RTD|      2.499|      3.249|     17.999|       0|     0|      2.083|     22.624
RTD|      2.499|      3.249|     15.666|       0|     0|      2.083|     22.624
RTD|      2.499|      3.333|     15.416|       0|     0|      2.083|     22.624
RTD|      2.416|      3.333|     17.333|       0|     0|      2.083|     22.624
RTD|      2.499|      3.208|     12.208|       0|     0|      2.083|     22.624


And later, after 27 minutes:


RTT|  00:26:58  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.499|      3.249|     17.624|       0|     0|      1.749|     28.291
RTD|      2.499|      3.333|     17.499|       0|     0|      1.749|     28.291
RTD|      2.416|      3.249|     15.624|       0|     0|      1.749|     28.291
RTD|      2.499|      3.333|     16.874|       0|     0|      1.749|     28.291
RTD|      2.499|      3.208|     12.333|       0|     0|      1.749|     28.291
RTD|      2.083|      3.333|     17.666|       0|     0|      1.749|     28.291
RTD|      2.416|      3.291|     16.833|       0|     0|      1.749|     28.291
RTD|      2.499|      3.333|     17.291|       0|     0|      1.749|     28.291
RTD|      2.249|      3.208|     16.624|       0|     0|      1.749|     28.291
RTD|      2.499|      3.416|     17.291|       0|     0|      1.749|     28.291
RTD|      2.416|      3.208|     16.874|       0|     0|      1.749|     28.291
RTD|      2.499|      3.333|     16.208|       0|     0|      1.749|     28.291
RTD|      2.499|      3.249|     15.416|       0|     0|      1.749|     28.291
RTD|      2.499|      3.374|     15.749|       0|     0|      1.749|     28.291
RTD|      2.499|      3.249|     15.208|       0|     0|      1.749|     28.291
RTD|      2.333|      3.374|     17.333|       0|     0|      1.749|     28.291
RTD|      2.499|      3.208|     17.083|       0|     0|      1.749|     28.291
RTD|      2.499|      3.374|     20.583|       0|     0|      1.749|     28.291
RTD|      2.416|      3.208|     15.833|       0|     0|      1.749|     28.291
RTD|      2.499|      3.333|     14.958|       0|     0|      1.749|     28.291
---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      1.749|      3.249|     28.291|       0|     0|    00:27:18/00:27:18
root@sun5i>#


Thats about 30usec worst case latency, it is promising and quite good, it is usable.
I have to find more evil and stressfull programs than stress, and test it longer than 30 minutes.
I will test Crubille's,  CAS settings for dram also, it can help a bit.

Thx Crubille this was a nice job :)

crubille

I am glad that you were able to compile and run my port of xenomai.

I get not so good values for long test with load, but i set /proc/xenomai/latency to 0, as the default is 9 us, it is a part of the difference.

Even with /proc/xenomai/lattency set to 0, I got a few negative values ​​for minimum lattences. I'll ask on the xenomai list about this.

I add irq priority and everything run, but not so much faster. I want to adapt some test to check if it is effective before releasing it.




Tele

Quote from: crubille on February 28, 2013, 11:40:00 PM
I get not so good values for long test with load, but I set /proc/xenomai/latency to 0, as the default is 9 us, it is a part of the difference.

This is the rule to set /proc/xenomai/latency, as I know it :

If /proc/xenomai/latency is less than the smallest "lat best" (best latency you get with the measuring) then you can set /proc/xenomai/latency to that value:   let /proc/xenomai/latency = "lat best"

If /proc/xenomai/latency is bigger than the smallest "lat best" then you can add that "lat best" to /proc/xenomai/latency :  let /proc/xenomai/latency = /proc/xenomai/latency + "lat best"

for example:
you set

echo 0 > /proc/xenomai/latency
./latency -p 100
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|     11.999|     12.708|     21.333|       0|     0|     11.999|     21.333
RTD|     12.624|     12.791|     21.541|       0|     0|     11.999|     21.541
RTD|     12.458|     12.791|     26.458|       0|     0|     11.999|     26.458


you can set /proc/xenomai/latency = lat best = 11999 :

echo 11999 > /proc/xenomai/latency

then make a new latency test, and repeat.

The other case, if you set /proc/xenomai/latency to 10000 and then you get:

echo 10000 > /proc/xenomai/latency
./latency -p 100
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.499|      3.249|     17.624|       0|     0|      1.749|     28.291
RTD|      2.499|      3.333|     17.499|       0|     0|      1.749|     28.291
RTD|      2.416|      3.249|     15.624|       0|     0|      1.749|     28.291

then you can set
/proc/xenomai/latency = /proc/xenomai/latency + lat best = 10000 + 1749 = 11749 :

echo 11749 > /proc/xenomai/latency


then run latency test again, and repeat.

The goal is to bring "lat min" to the minimum (of course that brings other values to minimum as well), but you cannot have any negative values, no where. When "lat min" is getting near to 0 ( 500...1000 is already very good value, its less than 1 microsec !), then you can stop it, you have completed setting of /proc/xenomai/latency

Some values are in nanoseconds some others are in microseconds, dont get confused about that.

When you set any rounded value with echo, you always get a 9-ending value back (just like in the shop, maybe xenomai was developed by a merchant), I donno the reason. You set 10000, it will be 9999.

This is what I know about /proc/xenomai/latency   , but I could be wrong.

ehj666

Quote from: Tele on February 28, 2013, 05:22:33 PM

I dont use github, Im not sure about this, but try it in 2 steps:

git clone git://github.com/linux-sunxi/linux-sunxi.git linux-sunxi
cd ./linux-sunxi
git checkout sunxi-v3.4.24-r1


Instead of the above, I download the specific kernel tarball directly, I dont need the whole 1GB sunxi repository.

wget https://github.com/linux-sunxi/linux-sunxi/archive/sunxi-v3.4.24-r1.tar.gz
tar -xf sunxi-v3.4.24-r1.tar.gz


Ok, it looks like I have successfully built a xenomai kernel. The boot log indicates that xenomai is in fact running.

Now for testing. How does xeno or xeno-test get installed? It is not recognized as installed and the xenomai doc is not clear where this comes from.

Tele

Quote from: ehj666 on March 01, 2013, 04:36:55 AM
Now for testing. How does xeno or xeno-test get installed? It is not recognized as installed and the xenomai doc is not clear where this comes from.

if your xenomai directory <xenomai_dir>  (for example /work/xenomai-2.6.2.1)
if your compiler prefix is <toolchain-prefix> (for example arm-none-linux-gnueabi or arm-linux-gnueabihf or something like that)
then:


cd <xenomai dir>
mkdir install
./configure CC=<toolchain-prefix>-gcc AR=<toolchain-prefix>-ar LD=<toolchain-prefix>-ld CFLAGS="-march=armv7-a" LDFLAGS="-march=armv7-a" \
--host=arm-none-linux-gnueabi --prefix=<xenomai_dir>/install

CFLAGS could be armv7-a or armv7a , it depends on your gcc, it gives an error back, if doesnt like it.

if no error then:

make install



on your rootfs SD make a dir:
/usr/xenomai

then copy <xenomai_dir>/install/bin and <xenomai_dir>/install/sbin into it
then copy <xenomai_dir>/install/lib  onto your rootfs SD /usr/lib

You are done.
After booting you can go there and run any xeno tests.

cd /usr/xenomai/bin
./latency -p 100

uMinded

Well I solved all my kernel virtual pointer issues. I will post more on that when I have everything sorted out and orginized. I must have tried a hundred things...

Do you guys have an arm rpm for stress or what string did you use to compile? make CROSS_COMPILE is ignored, and ./configure --host= as well? So I used this to load the system to 100%

cat /dev/zero > /dev/null


Here are my numbers:

RTT|  00:02:07  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      5.374|      5.791|     12.874|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     15.624|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     10.583|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     11.708|       0|     0|      5.291|     15.958
RTD|      5.458|      5.833|     14.208|       0|     0|      5.291|     15.958
RTD|      5.374|      5.874|     11.374|       0|     0|      5.291|     15.958
RTD|      5.458|      5.791|     11.874|       0|     0|      5.291|     15.958
RTD|      5.291|      5.791|     12.958|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     12.249|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     11.999|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     10.583|       0|     0|      5.291|     15.958
RTD|      5.333|      5.874|     11.708|       0|     0|      5.291|     15.958
RTD|      5.458|      5.833|     11.541|       0|     0|      5.291|     15.958
RTD|      5.458|      5.791|     12.749|       0|     0|      5.291|     15.958
RTD|      5.333|      5.791|     11.374|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     12.041|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|     10.791|       0|     0|      5.291|     15.958
RTD|      5.458|      5.749|      9.624|       0|     0|      5.291|     15.958
RTD|      5.291|      5.916|     10.874|       0|     0|      5.291|     15.958
RTD|      5.458|      5.833|     12.541|       0|     0|      5.291|     15.958
RTD|      5.333|      5.791|     14.499|       0|     0|      5.291|     15.958



RTT|  00:01:25  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.249|      0.541|      5.083|       0|     0|      0.041|     11.833
RTD|      0.249|      0.541|      6.874|       0|     0|      0.041|     11.833
RTD|      0.124|      0.708|      6.458|       0|     0|      0.041|     11.833
RTD|      0.249|      0.583|      9.791|       0|     0|      0.041|     11.833
RTD|      0.124|      0.541|      7.374|       0|     0|      0.041|     11.833
RTD|      0.249|      0.541|      9.083|       0|     0|      0.041|     11.833
RTD|      0.249|      0.541|      5.583|       0|     0|      0.041|     11.833
RTD|      0.249|      0.541|      6.791|       0|     0|      0.041|     11.833
RTD|      0.249|      0.624|      7.624|       0|     0|      0.041|     11.833
RTD|      0.124|      0.666|      8.541|       0|     0|      0.041|     11.833
RTD|      0.249|      0.583|      8.624|       0|     0|      0.041|     11.833
RTD|      0.124|      0.541|      6.166|       0|     0|      0.041|     11.833
RTD|      0.208|      0.541|      7.208|       0|     0|      0.041|     11.833
RTD|      0.249|      0.499|      5.291|       0|     0|      0.041|     11.833
RTD|      0.208|      0.541|      5.124|       0|     0|      0.041|     11.833
RTD|      0.166|      0.666|      5.541|       0|     0|      0.041|     11.833
RTD|      0.249|      0.624|      7.999|       0|     0|      0.041|     11.833
RTD|      0.249|      0.541|      7.249|       0|     0|      0.041|     11.833
RTD|      0.124|      0.541|      9.416|       0|     0|      0.041|     11.833
RTD|      0.249|      0.499|      5.874|       0|     0|      0.041|     11.833
RTD|      0.249|      0.541|      5.208|       0|     0|      0.041|     11.833


If I test with /usr/xenomai/dohell 900 I get "Load average: 9.27 7.10 4.16" and:

# echo 5200 > /proc/xenomai/latency
# /usr/xenomai/bin/latency -p 100

RTT|  00:01:04  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.208|      3.874|     14.624|       0|     0|      0.000|     21.874
RTD|      0.416|      3.208|     16.499|       0|     0|      0.000|     21.874
RTD|      0.124|      3.708|     16.208|       0|     0|      0.000|     21.874
RTD|      0.499|      3.874|     16.166|       0|     0|      0.000|     21.874
RTD|      0.499|      3.791|     15.166|       0|     0|      0.000|     21.874
RTD|      0.499|      3.791|     14.541|       0|     0|      0.000|     21.874
RTD|      0.416|      3.791|     15.541|       0|     0|      0.000|     21.874
RTD|      0.208|      3.749|     15.124|       0|     0|      0.000|     21.874
RTD|      0.499|      3.916|     17.666|       0|     0|      0.000|     21.874
RTD|      0.124|      3.749|     18.958|       0|     0|      0.000|     21.874
RTD|      0.124|      3.624|     15.666|       0|     0|      0.000|     21.874
RTD|      0.124|      2.083|     14.833|       0|     0|      0.000|     21.874
RTD|      0.166|      3.749|     14.499|       0|     0|      0.000|     21.874
RTD|      0.458|      3.874|     18.083|       0|     0|      0.000|     21.874
RTD|      0.166|      3.874|     14.499|       0|     0|      0.000|     21.874
RTD|      0.416|      3.874|     16.249|       0|     0|      0.000|     21.874
RTD|      0.166|      3.458|     16.499|       0|     0|      0.000|     21.874
RTD|      0.499|      3.833|     14.499|       0|     0|      0.000|     21.874
RTD|      0.499|      3.791|     14.333|       0|     0|      0.000|     21.874
RTD|      0.499|      3.958|     17.208|       0|     0|      0.000|     21.874
RTD|      0.499|      3.916|     14.333|       0|     0|      0.000|     21.874

Tele

Quote from: uMinded on March 02, 2013, 03:31:19 AM
Do you guys have an arm rpm for stress or what string did you use to compile? make CROSS_COMPILE is ignored, and ./configure --host= as well? So I used this to load the system to 100%
In that case you have to specify the compiler explicitly. It will be a little bit long config line.

But 1st, if you use uclibc you have to patch stress sourcewith this file, (stress-001-remove-largefile.patch):

Remove largefile

Otherwise it doesn't compile in uClibc without largefile.

If the toolchain does support largefile, it will still work on large files
anyway.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Upstream status: mail sent to apw@rossby.metr.ou.edu
---
diff -rup stress-1.0.4.orig/src/Makefile.am stress-1.0.4/src/Makefile.am
--- stress-1.0.4.orig/src/Makefile.am 2009-12-03 02:04:05.000000000 +0100
+++ stress-1.0.4/src/Makefile.am 2012-05-04 23:09:48.229842463 +0200
@@ -1,7 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in

-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
bin_PROGRAMS = stress
stress_SOURCES = stress.c
stress_MANS = stress.1


now patch it with the above patch file:

patch -p1 < stress-001-remove-largefile.patch


Then you have to autoreconf the stress config files, (this is stress specific, not usual):

autoupdate
autoreconf -Wall


then make an install dir and call configure:

mkdir install
./configure CC=arm-cortex_a8-linux-gnueabi-gcc \
AS=arm-cortex_a8-linux-gnueabi-as \
LD=arm-cortex_a8-linux-gnueabi-ld \
CFLAGS="-pipe -g -fPIC -march=armv7-a -mtune=cortex-a8 -mthumb -mfpu=neon -mfloat-abi=hard" \
--host=armv7a-unknown-linux-gnueabihf \
--prefix=$PWD/install


of course, substitute the 'arm-cortex_a8-linux-gnueabi' compiler prefix with yours, and refine the compiler flags as you like it.
then just make it:

make install

and it will be installed in the ./install directory, you can copy that onto your SD card, rootfs /usr directory.

ehj666

Quote from: Tele on March 01, 2013, 08:03:41 AM

if your xenomai directory <xenomai_dir>  (for example /work/xenomai-2.6.2.1)
if your compiler prefix is <toolchain-prefix> (for example arm-none-linux-gnueabi or arm-linux-gnueabihf or something like that)
then:


cd <xenomai dir>
mkdir install
./configure CC=<toolchain-prefix>-gcc AR=<toolchain-prefix>-ar LD=<toolchain-prefix>-ld CFLAGS="-march=armv7-a" LDFLAGS="-march=armv7-a" \
--host=arm-none-linux-gnueabi --prefix=<xenomai_dir>/install

CFLAGS could be armv7-a or armv7a , it depends on your gcc, it gives an error back, if doesnt like it.

if no error then:

make install


I am afraid I do not understand the appropriate substitutions. I am running in a cross compile environment from an Ubuntu 12.04 X86. I tried the following:


./configure CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld CFLAGS="-march=arm7-a" \
LDFLAGS="-march=arm7-a" --host=arm-linux-gnueabi- --prefix=<fully qualified path>/install


The error I get is:

configure: WARNING: if you wanted to set the --build type, don't use --host
    if a cross compiler is detected the cross compile mode will be used
Invalid configuration 'arm-linux-gnueabi-': machine 'arm-linux-gnueabi' not recognized.


if I remove --host then I get:

checking build system type,,, i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... arm-linux-gnueabi-gcc
checking whether the C compiler works... no
configure: error: in '...xenomai-2.6.2.1'
configure: error: C compiler cannot create executables


Thanks

crubille

#131
Hello everybody,


good news and bad news ...

bad news first: in the user manual, there is no way to set PLL6 as entry for TIMER2. And it look like this one is right. The only way to get a 100 MHz clock is to go to timer0, timer1 or av_timer, but all of these are used in some way in the kernel linux.

good news:
    - i create an "preempt" test from the "latency" one: A xenomai task run for 1/4 of it's period, reading and reading the xenomai clock and, each time, it record the delta, computing min, max and avg.

    - from the previous, i know now that my priority-interrupt version do the job.

Here is an example testing preempt (NOT latencies) for this new version:

./preempt -h -p 100
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----pre min|----pre avg|----pre max|-overrun|---msw|---pre best|--pre worst
RTD|      0.333|      0.374|      1.999|       0|     0|      0.333|      1.999
RTD|      0.333|      0.374|      0.833|       0|     0|      0.333|      1.999
RTD|      0.333|      0.374|      2.874|       0|     0|      0.333|      2.874
RTD|      0.333|      0.374|      0.874|       0|     0|      0.333|      2.874
RTD|      0.333|      0.374|      0.749|       0|     0|      0.333|      2.874
RTD|      0.333|      0.374|      0.708|       0|     0|      0.333|      2.874
RTD|      0.333|      0.374|      3.666|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      0.833|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      2.583|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      1.958|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      2.999|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      3.374|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      0.833|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      0.749|       0|     0|      0.333|      3.666
RTD|      0.333|      0.374|      3.541|       0|     0|      0.333|      3.666
^C---|--param|----range-|--samples
HSD|    min|   0 -  1 |       15
---|--param|----range-|--samples
HSD|    avg|   0 -  1 |   154038
---|--param|----range-|--samples
HSD|    max|   0 -  1 |        7
HSD|    max|   1 -  2 |        2
HSD|    max|   2 -  3 |        3
HSD|    max|   3 -  4 |        3
HSH|--param|--samples-|--average--|---stddev--
HSS|    min|        15|      0.000|      0.000
HSS|    avg|    154038|      0.000|      0.000
HSS|    max|        15|      1.133|      1.246


And for the previous version (without load):

./preempt -h -p 100
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----pre min|----pre avg|----pre max|-overrun|---msw|---pre best|--lat worst
RTD|      0.333|      0.374|      7.458|       0|     0|      0.333|      7.458
RTD|      0.333|      0.374|     11.333|       0|     0|      0.333|     11.333
RTD|      0.333|      0.374|     11.999|       0|     0|      0.333|     11.999
RTD|      0.333|      0.374|     11.749|       0|     0|      0.333|     11.999
RTD|      0.333|      0.374|     11.499|       0|     0|      0.333|     11.999
RTD|      0.333|      0.374|     13.958|       0|     0|      0.333|     13.958
RTD|      0.333|      0.374|     12.083|       0|     0|      0.333|     13.958
RTD|      0.333|      0.374|     12.083|       0|     0|      0.333|     13.958
RTD|      0.333|      0.374|     12.291|       0|     0|      0.333|     13.958
RTD|      0.333|      0.374|     12.958|       0|     0|      0.333|     13.958
^C---|--param|----range-|--samples
HSD|    min|   0 -  1 |       10
---|--param|----range-|--samples
HSD|    avg|   0 -  1 |   106698
HSD|    avg|   6 -  7 |      153
HSD|    avg|   7 -  8 |      121
HSD|    avg|   8 -  9 |       27
HSD|    avg|   9 - 10 |        8
HSD|    avg|  10 - 11 |        4
HSD|    avg|  11 - 12 |        4
HSD|    avg|  12 - 13 |        1
---|--param|----range-|--samples
HSD|    max|   7 -  8 |        1
HSD|    max|  11 - 12 |        4
HSD|    max|  12 - 13 |        4
HSD|    max|  13 - 14 |        1
HSH|--param|--samples-|--average--|---stddev--
HSS|    min|        10|      0.000|      0.000
HSS|    avg|    107016|      0.020|      0.372
HSS|    max|        10|     11.200|      1.619


uMinded

Quote from: ehj666 on March 03, 2013, 06:42:07 PM
I am afraid I do not understand the appropriate substitutions. I am running in a cross compile environment from an Ubuntu 12.04 X86. I tried the following:


./configure CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld CFLAGS="-march=arm7-a" \
LDFLAGS="-march=arm7-a" --host=arm-linux-gnueabi- --prefix=<fully qualified path>/install


I ran into this quite a bit when I started cross compiling, you give make arm-coretx_a8-linux-gnueabi- as make has macros inside like this CC = cpp so it compines into arm-coretx_a8-linux-gnueabi-cpp.

Automake however defines its macros as CC = -gcc so if you give it arm-coretx_a8-linux-gnueabi- then it will combine into arm-coretx_a8-linux-gnueabi--gcc which does not exist!

So when using a ./configure specify your toolchain WITHOUT the trailing -

EDIT:

Also make sure your toolchain is in your $PATH variable. If at the terminal you can type "arm" <tab><tab> your compile should list.

uMinded

Quote from: crubille on March 03, 2013, 07:57:04 PM
good news and bad news ...

bad news first: in the user manual, there is no way to set PLL6 as entry for TIMER2. And it look like this one is right. The only way to get a 100 MHz clock is to go to timer0, timer1 or av_timer, but all of these are used in some way in the kernel linux.

good news:
    - i create an "preempt" test from the "latency" one: A xenomai task run for 1/4 of it's period, reading and reading the xenomai clock and, each time, it record the delta, computing min, max and avg.

I actually got a 100MHz kernel running about an hour ago! I mean I have my timers set to PLL6 and the timer is running without issues so I ASSUME its at 100 MHz... Do you know of a way to actually test the speed their counting at??

Also can you share your "preempt" program? I would love to see if my extra speed makes any difference.

My latency numbers:


stress -m 10 --vm-bytes 5000 -c 10 (Load avg:21.21 16.82 8.7)
echo 4720 > /proc/xenomai/latency
latency -p 100 -h

RTT|  00:01:04  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.050|      0.700|      9.130|       0|     0|      0.050|     14.880
RTD|      0.050|      0.700|      9.490|       0|     0|      0.050|     14.880
RTD|      0.050|      0.690|     10.720|       0|     0|      0.050|     14.880
RTD|      0.050|      0.690|     10.440|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|     11.600|       0|     0|      0.050|     14.880
RTD|      0.050|      0.700|     10.440|       0|     0|      0.050|     14.880
RTD|      0.050|      0.690|     10.640|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|     10.810|       0|     0|      0.050|     14.880
RTD|      0.050|      0.700|     11.440|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|      9.600|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|     10.600|       0|     0|      0.050|     14.880
RTD|      0.050|      0.700|     11.690|       0|     0|      0.050|     14.880
RTD|      0.050|      0.690|     12.050|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|     12.130|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|     10.960|       0|     0|      0.050|     14.880
RTD|      0.050|      0.700|     11.690|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|     11.560|       0|     0|      0.050|     14.880
RTD|      0.050|      0.700|     14.250|       0|     0|      0.050|     14.880
RTD|      0.050|      0.690|     11.690|       0|     0|      0.050|     14.880
RTD|      0.050|      0.690|      9.930|       0|     0|      0.050|     14.880
RTD|      0.080|      0.690|     10.440|       0|     0|      0.050|     14.880



dohell 900 (Load avg:21.21 16.82 8.7)
echo 4720 > /proc/xenomai/latency
latency -p 100 -h

RTT|  00:00:43  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.400|      3.740|     15.600|       0|     0|      0.000|     18.000
RTD|      0.570|      3.400|     16.690|       0|     0|      0.000|     18.000
RTD|      0.570|      3.040|     16.570|       0|     0|      0.000|     18.000
RTD|      0.440|      3.910|     14.640|       0|     0|      0.000|     18.000
RTD|      0.440|      3.940|     14.400|       0|     0|      0.000|     18.000
RTD|      0.370|      3.750|     13.760|       0|     0|      0.000|     18.000
RTD|      0.370|      3.880|     16.370|       0|     0|      0.000|     18.000
RTD|      0.640|      4.000|     13.930|       0|     0|      0.000|     18.000
RTD|      0.440|      3.790|     15.280|       0|     0|      0.000|     18.000
RTD|      0.640|      3.940|     15.040|       0|     0|      0.000|     18.000
RTD|      0.400|      3.930|     15.720|       0|     0|      0.000|     18.000
RTD|      0.400|      3.570|     13.130|       0|     0|      0.000|     18.000
RTD|      0.520|      3.900|     14.160|       0|     0|      0.000|     18.000
RTD|      0.490|      3.750|     16.520|       0|     0|      0.000|     18.000
RTD|      0.490|      3.660|     14.000|       0|     0|      0.000|     18.000
RTD|      0.640|      3.850|     15.280|       0|     0|      0.000|     18.000
RTD|      0.440|      3.760|     15.810|       0|     0|      0.000|     18.000
RTD|      0.400|      3.930|     17.370|       0|     0|      0.000|     18.000
RTD|      0.600|      3.900|     14.600|       0|     0|      0.000|     18.000
RTD|      0.440|      3.840|     14.570|       0|     0|      0.000|     18.000
RTD|      0.400|      3.830|     14.570|       0|     0|      0.000|     18.000

crubille

Hello uMinded,

What is the counter you use?

AMHA, the best way to be sure the timers use PLL/6 is to read their ctrl register! Then, my "preempt" code can be useful as the values are multiples of clock steps: In the examples i send, when the task is not preempted, the values are 8 (333ns) or 9 (374ns) clock steps (using the clock at 24MHz). If you get for example 350ns and 360ns, then your clock step is 10 ns.

I can send you the code if you send me your mail as private message.