Once you install the user-space library support you can have some fun.
First thing: "Calibrating the Cobalt core timer" (see relevant section here). Note that autotune
will not be in /usr/xenomai/bin
, but in $XENOMAI_BUILD_FOLDER/utils/autotune/autotune
.
root@beaglebone ~$ ./build/xenomai/utils/autotune/autotune
== auto-tuning started, period=1000000 ns (may take a while)
irq gravity... 999 ns
kernel gravity... 5999 ns
user gravity... 5499 ns
== auto-tuning completed after 27s
Now take those values and send them to coreclk (Xenomai docs have a typo at this step):
root@beaglebone ~$ echo "999i 5999k 5499u" > /proc/xenomai/clock/coreclk
These values should be set via a startup script.
Now you can run latency
:
root@beaglebone ~$ /usr/xenomai/bin/latency
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT| 00:00:01 (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD| 7.958| 11.133| 18.208| 0| 0| 7.958| 18.208
RTD| 8.000| 11.434| 41.541| 0| 0| 7.958| 41.541
...
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS| 7.872| 11.098| 54.957| 0| 0| 00:00:18/00:00:18
Still not as good as they should be. Maybe some playing around with the CONFIGs or the user-space library options would help?
Another thing is
root@beaglebone ~/xenomai_staging$ /usr/xenomai/bin/xeno-test -k
Started child 4989: /bin/bash /usr/xenomai/bin/xeno-test-run-wrapper /usr/xenomai/bin/xeno-test -k
...
FAILURE rt_thread_body:116: no SIGDEBUG_MIGRATE_PRIOINV received
which unfortunately fails (I am enquiring the Xenomai mailing list about this).
New kernel is up here, the config file is here.