All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] error in executing xenomai tests
@ 2011-01-05 17:12 gprizzi
  2011-01-05 17:32 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: gprizzi @ 2011-01-05 17:12 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 6820 bytes --]

 Dear sirs,

 I have a fresh install of xenomai 2.5.5.2.

I found the directory 

/usr/share/xenomai/testsuite/

in which there are subdirectory with different test.

I tried to execute them bat I got a lot of errors that you can see here below.

The most frequent error is the following:

FATAL: Module xeno_nucleus not found.

Have I made errors in xenomai installation process?

Have I a working xenomai system?

Moreover where can I found documentation that can help me to understand if the performances of the execute tests
are god?

During installation I used the following procedure that was explained on the page 
http://www.xenomai.org.php/Building_Debian_packages that now in no more available (why?)


INSTALLATION PROCEDURE

download of xenomai-2.5.2.2.tar.bz2 

extraction of files in 

Download/xenomai-2.5.2.2

apt-get install devscripts debhelper dh-kpatches findutils

DEBEMAIL="xxx@domain.hid" DEBFULLNAME="Your Name" debchange -v 2.5.5.2 Release 2.5.5.2

cd Download/xenomai-2.5.2.2 
debuild -uc -us
dpkg -i *.deb

dowload of linux kernel
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.7.tar.bz2 && tar -jxf linux-2.6.35.7.tar.bz2 && cd linux-2.6.35.7

/usr/src/kernel-patches/i386/apply/xenomai

cp /boot/.config-2.6.35-22-generic .config
make oldconfig
make menuconfig 

to set the following options:

Processor type and features
  Processor Family 

Power management and ACPI options
  ACPI (Advanced Configuration and Power Interface support)
    Processor (disableb)

CPU Frequency scaling (disabled)

Processor type and features
  AMD IOMMU Support(disabled)

Bus Options (PCI etc.)
  Message Signaled Interrupts (MSI and MSI-X) (disabled)

kernel compilation

CONCURRENCY_LEVEL=2 CLEAN_SOURCE=no fakeroot make-kpkg --initrd --append-to-version -xenomai-2.5.5.2 --revision 1.0 kernel_image kernel_headers

dpkg -i linux-image*.deb
dpkg -i linux-header*.deb
update-initramfs -c -k 2.6.35.7-xenomai-2.5.5.2 && update-grub



ERRORS IN TESTS

irqbench test

root@domain.hid# ./run
*
*
* Type ^C to stop this application.
*
*
FATAL: Module xeno_nucleus not found.
FATAL: Error running install command for xeno_nucleus
irqloop: failed to open benchmark device: No such file or directory
(modprobe xeno_irqbench?)
ERROR: Module xeno_rtdm does not exist in /proc/modules
ERROR: Module xeno_posix does not exist in /proc/modules
ERROR: Module xeno_nucleus does not exist in /proc/modules
root@domain.hid# ^C

klatency test

root@domain.hid# ./run
*
*
* Type ^C to stop this application.
*
*
FATAL: Module xeno_nucleus not found.
FATAL: Error running install command for xeno_nucleus
open(/proc/xenomai/registry/native/pipes/klat_pipe): No such file or directory
modprobe klat_mod or try the -P option?
ERROR: Module xeno_timerbench does not exist in /proc/modules
ERROR: Module xeno_rtdm does not exist in /proc/modules
ERROR: Module xeno_native does not exist in /proc/modules
ERROR: Module xeno_nucleus does not exist in /proc/modules

sigtest test

root@domain.hid# ./run
*
*
* Type ^C to stop this application.
*
*
FATAL: Module xeno_nucleus not found.
FATAL: Error running install command for xeno_nucleus
Xenomai: SIGTEST skin or CONFIG_XENO_OPT_PERVASIVE disabled.
(modprobe xeno_sigtest?)
ERROR: Module xeno_rtdm does not exist in /proc/modules
ERROR: Module xeno_posix does not exist in /proc/modules
ERROR: Module xeno_nucleus does not exist in /proc/modules
root@domain.hid# ^C
root@domain.hid# 


switchtest test

root@domain.hid# ./run
*
*
* Type ^C to stop this application.
*
*
FATAL: Module xeno_nucleus not found.
FATAL: Error running install command for xeno_nucleus
== Testing FPU check routines...
r0: 1 != 2
r1: 1 != 2
r2: 1 != 2
r3: 1 != 2
r4: 1 != 2
r5: 1 != 2
r6: 1 != 2
r7: 1 != 2
== FPU check routines: OK.
ioctl(RTTST_RTIOC_SWTEST_CREATE_KTASK): Cannot allocate memory
== Threads: sleeper_ufps0-0 rtk0-1 rtk0-2 rtk_fp0-3 rtk_fp0-4 rtk_fp_ufpp0-5 rtk_fp_ufpp0-6 rtup0-7 rtup0-8 rtup_ufpp0-9 rtup_ufpp0-10 rtus0-11 rtus0-12 rtus_ufps0-13 rtus_ufps0-14 rtuo0-15 rtuo0-16 rtuo_ufpp0-17 rtuo_ufpp0-18 rtuo_ufps0-19 rtuo_ufps0-20 rtuo_ufpp_ufps0-21 rtuo_ufpp_ufps0-22 sleeper_ufps1-0 rtk1-1 rtk1-2 rtk_fp1-3 rtk_fp1-4 rtk_fp_ufpp1-5 rtk_fp_ufpp1-6 rtup1-7 rtup1-8 rtup_ufpp1-9 rtup_ufpp1-10 rtus1-11 rtus1-12 rtus_ufps1-13 rtus_ufps1-14 rtuo1-15 rtuo1-16 rtuo_ufpp1-17 rtuo_ufpp1-18 rtuo_ufps1-19 rtuo_ufps1-20 rtuo_ufpp_ufps1-21 rtuo_ufpp_ufps1-22 sleeper_ufps2-0 rtk2-1 rtk2-2 rtk_fp2-3RTT|  359512:23:52
RTH|---------cpu|ctx switches|-------total
RTD|           0|           0|           0
RTD|           1|           0|           0
RTD|           2|           0|           0
ERROR: Module xeno_switchtest does not exist in /proc/modules
ERROR: Module xeno_rtdm does not exist in /proc/modules
ERROR: Module xeno_posix does not exist in /proc/modules
ERROR: Module xeno_nucleus does not exist in /proc/modules

unit test

*
*
* Type ^C to stop this application.
*
*
FATAL: Module xeno_nucleus not found.
FATAL: Error running install command for xeno_nucleus
mul: 0x79364d93, shft: 26
integ: 30, frac: 0x4d9364d9364d9364

signed positive operation: 0x03ffffffffffffff * 1000000000 / 33000000
inline calibration: 0x0000000000000000: 29.102 ns, rejected 0/10000
inlined llimd: 0x79364d9364d9362f: 54.872 ns, rejected 1/10000
inlined llmulshft: 0x79364d92ffffffe1: 1.246 ns, rejected 0/10000
inlined nodiv_llimd: 0x79364d9364d9362f: 4.570 ns, rejected 0/10000
out of line calibration: 0x0000000000000000: 30.351 ns, rejected 1/10000
out of line llimd: 0x79364d9364d9362f: 60.692 ns, rejected 1/10000
out of line llmulshft: 0x79364d92ffffffe1: 0.830 ns, rejected 1/10000
out of line nodiv_llimd: 0x79364d9364d9362f: 4.571 ns, rejected 1/10000

signed negative operation: 0xfc00000000000001 * 1000000000 / 33000000
inline calibration: 0x0000000000000000: 31.635 ns, rejected 1/10000
inlined llimd: 0x86c9b26c9b26c9d1: 53.173 ns, rejected 1/10000
inlined llmulshft: 0x86c9b26d0000001e: 0.678 ns, rejected 0/10000
inlined nodiv_llimd: 0x86c9b26c9b26c9d1: 3.286 ns, rejected 1/10000
out of line calibration: 0x0000000000000000: 30.351 ns, rejected 0/10000
out of line llimd: 0x86c9b26c9b26c9d1: 64.434 ns, rejected 1/10000
out of line llmulshft: 0x86c9b26d0000001e: 4.569 ns, rejected 1/10000
out of line nodiv_llimd: 0x86c9b26c9b26c9d1: 5.819 ns, rejected 1/10000

unsigned operation: 0x03ffffffffffffff * 1000000000 / 33000000
inline calibration: 0x0000000000000000: 31.531 ns, rejected 0/10000
inlined nodiv_ullimd: 0x79364d9364d9362f: 2.140 ns, rejected 0/10000
out of line calibration: 0x0000000000000000: 30.351 ns, rejected 0/10000
out of line nodiv_ullimd: 0x79364d9364d9362f: 4.571 ns, rejected 1/10000
ERROR: Module xeno_native does not exist in /proc/modules
ERROR: Module xeno_nucleus does not exist in /proc/modules
root@domain.hid# 

 

[-- Attachment #2: Type: text/html, Size: 8114 bytes --]

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

* Re: [Xenomai-help] error in executing xenomai tests
  2011-01-05 17:12 [Xenomai-help] error in executing xenomai tests gprizzi
@ 2011-01-05 17:32 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-01-05 17:32 UTC (permalink / raw)
  To: gprizzi; +Cc: xenomai

gprizzi@domain.hid wrote:
>  Dear sirs,
> 
>  I have a fresh install of xenomai 2.5.5.2.
> 
> I found the directory 
> 
> /usr/share/xenomai/testsuite/
> 
> in which there are subdirectory with different test.
> 
> I tried to execute them bat I got a lot of errors that you can see here below.
> 
> The most frequent error is the following:
> 
> FATAL: Module xeno_nucleus not found.

This one is spurious: if you set CONFIG_XENO_OPT_NUCLEUS to y, then it
is normal that xeno_nucleus is not compiled as a module. If you choose
xenomai nucleus to be compiled as a module, but are running on a busybox
based system, the xeno-load script does not work. Since you do not tell
us your kernel configuration, or any other detail, for that matter, we
have to guess here. But it is better to avoid using run. Just run the
binaries you are interested in directly, load any module needed when you
are told with modprobe. xeno-load and "run" scripts are going to
disappear from the 2.6 branch

> 
> Have I made errors in xenomai installation process?

The errors you have only come from the fact that the default kernel
configuration do not enable all the options which allow running all the
tests.

So, no, you have made no error. You simply did not enable some options
needed for the tests to run correctly. Fortunately, error message tell
you what to do.

> 
> Have I a working xenomai system?
> 
> Moreover where can I found documentation that can help me to understand if the performances of the execute tests
> are god?

No, here, simply understanding what the test does (manpages help), and
the result it gives will help you. A performance is good if it is
sufficient for what your application needs. Not knowing what your
application needs, it is hard for us to tell us whether the performances
you get are sufficient.

> 
> During installation I used the following procedure that was explained on the page 
> http://www.xenomai.org.php/Building_Debian_packages that now in no more available (why?)

Because we do not own the xenomai.org.php domain, we only own xenomai.org.

> irqloop: failed to open benchmark device: No such file or directory
> (modprobe xeno_irqbench?)

enable irqbench in kernel configuration

> open(/proc/xenomai/registry/native/pipes/klat_pipe): No such file or directory
> modprobe klat_mod or try the -P option?

enable klatency in kernel configuratino

> Xenomai: SIGTEST skin or CONFIG_XENO_OPT_PERVASIVE disabled.
> (modprobe xeno_sigtest?)

enable sigtest in kernel configuration

> ioctl(RTTST_RTIOC_SWTEST_CREATE_KTASK): Cannot allocate memory

Increase size of the kernel tasks stacks pool.


-- 
					    Gilles.


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

* Re: [Xenomai-help] error in executing xenomai tests
  2011-01-06 20:01 [Xenomai-help] R: Re: R: " gprizzi
  2011-01-06 20:39 ` [Xenomai-help] " Gilles Chanteperdrix
@ 2011-01-06 21:25 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-01-06 21:25 UTC (permalink / raw)
  To: gprizzi; +Cc: xenomai

gprizzi@domain.hid wrote:
> Dear Sir,
> 
> I find your considerations very useful, unfortunately I am not  expert in tuning conventional 
> operating system with real time patch.
> 
> If you can help me I will greatly appreciate your advices.
> 
> I run latency test and got the following results:
> 
> root@domain.hid# ./latency
> == 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|     -1.786|      2.224|     19.821|       0|     0|     -1.786|     19.821
> RTD|     -1.796|      2.330|     19.490|       0|     0|     -1.796|     19.821
> RTD|     -1.831|      2.231|     19.495|       0|     0|     -1.831|     19.821
> RTD|     -1.772|      2.291|     19.743|       0|     0|     -1.831|     19.821
> RTD|     -1.473|      2.460|     19.708|       0|     0|     -1.831|     19.821
> RTD|     -1.524|      2.381|     19.717|       0|     0|     -1.831|     19.821
> RTD|     -1.752|      2.338|     19.807|       0|     0|     -1.831|     19.821
> RTD|     -1.893|      2.297|     19.520|       0|     0|     -1.893|     19.821
> RTD|     -2.192|      2.284|     19.549|       0|     0|     -2.192|     19.821
> RTD|     -1.635|      2.327|     19.530|       0|     0|     -2.192|     19.821
> RTD|     -1.416|      2.406|     19.580|       0|     0|     -2.192|     19.821
> RTD|     -1.305|      2.471|     14.930|       0|     0|     -2.192|     19.821
> RTD|     -1.782|      2.409|     14.999|       0|     0|     -2.192|     19.821
> RTD|     -1.774|      2.364|     18.456|       0|     0|     -2.192|     19.821
> RTD|     -1.784|      2.328|     19.914|       0|     0|     -2.192|     19.914
> RTD|     -1.768|      2.293|     19.639|       0|     0|     -2.192|     19.914
> RTD|     -1.777|      2.263|     19.463|       0|     0|     -2.192|     19.914
> RTD|     -1.228|      2.389|     19.923|       0|     0|     -2.192|     19.923
> RTD|     -1.223|      2.405|     19.579|       0|     0|     -2.192|     19.923
> RTD|     -1.778|      2.431|     14.499|       0|     0|     -2.192|     19.923
> RTD|     -1.983|      2.493|     15.335|       0|     0|     -2.192|     19.923

The info you are missing here, and which is not obvious, I admit, is
that by running latency 30 seconds on an idle system, you are not even
close of knowing the worst case latency of Xenomai on your system.

In order to evaluate the worst case latency of Xenomai on your system,
you have to run the latency test, for a long time, on a loaded system,
and with the frequency of the task whose latency you are interested in.

That said, I insist, unless you know or even have rough estimates of the
way your final application is behaving, this does not give you much of a
clue. Otherwise, you can not answer the question "is this latency
sufficient ?" right away, you have to wait for the application to be
developed and running.

-- 
                                                                Gilles.


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

* Re: [Xenomai-help] error in executing xenomai tests
  2011-01-06 20:01 [Xenomai-help] R: Re: R: " gprizzi
@ 2011-01-06 20:39 ` Gilles Chanteperdrix
  2011-01-06 21:25 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-01-06 20:39 UTC (permalink / raw)
  To: gprizzi; +Cc: xenomai

gprizzi@domain.hid wrote:
> Looking at the worst case of a latency of about 20 us with a task at 2 KHz
> I can estimate 2*10^-3 * 20 * 10 ^-6 = 40 * 10^-3 sec lost for latency in 1 sec..
> In the average case I will have 5*10^-3 sec. lost for latency in 1 sec. 
> 
> I think that these percentage can be accepted in a robotic position control,
> what do you think about these assumption?
> 
> Can you suggest me a better way to evaluate the latency with respect of robotic 
> position control system or can you suggest me some useful articles to read about this topic?

There is this piece of meat between your ears called a brain. Do not you
think, that, at some point, you will have to do what you are paid for
and use it?

Suppose that you have one acquisition, one one actuation, and some
real-time task between the two. If you know that the maximum allowed
time between the two is R, the worst case execution time of the
real-time task is W. Then the maximum wake up latency your system should
be able to provide is around R - W, or (R - W) / 2 if you want to play
it safe.

Of course, that was just a very sample example. And the problem you are
trying to solve may define other constraints. But that is the spirit.

In other words, I can not tell you whether 20us or 40us, or 80us is
enough for the system you are trying to build. I do not know.

Your problem is not about tuning Xenomai or preempt_rt. As far as
Xenomai is concerned, once it is installed, there are only a few things
you need to tune, and you will know when you need it. For instance, you
could start by tuning /proc/xenomai/latency so that the latency test
does not return negative values. But this is not your priority IMO.

> and I had a look at 
> 
> https://rt.wiki.kernel.org/index.php/Frequently_Asked_Questions
> 
> Do you think that setting CONFIG_PREEMT=y instead of 
> CONFIG_PREEMPT_VOLUNTARY=y
> will significantly reduce latency?

No, I was suggesting using the preempt_rt patch instead of Xenomai,
which is another way of having a deterministic operating system. With
this patch, there is no point in using CONFIG_PREEMPT or
CONFIG_PREEMPT_VOLUNTARY. The point is to use CONFIG_PREEMPT_RT.

Since you do not strike me as a co-kernel programming expert, chances
are that if preempt_rt is sufficient for the requirements of your system
and stable enough on your system, developing the application you have to
develop will be much less painful.

-- 
					    Gilles.


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

end of thread, other threads:[~2011-01-06 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-05 17:12 [Xenomai-help] error in executing xenomai tests gprizzi
2011-01-05 17:32 ` Gilles Chanteperdrix
2011-01-06 20:01 [Xenomai-help] R: Re: R: " gprizzi
2011-01-06 20:39 ` [Xenomai-help] " Gilles Chanteperdrix
2011-01-06 21:25 ` 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.