Adeos/Xenomai Arm Port
Hi again!
I've forgotten: I'm using ipipe-1.5-01 on 2.6.15.7 (builtin xenomai (skins+drivers))
1. spin_debug messages
2. switchtest
3. switchbench
4. cyclictest
5. latency
6. cross-compiled xenomai
Next time i will send my patch too. (i've to clean it a little bit)
-------------
1. With enabled kernel-debugging (spin_debug), while loading xeno_native (built-in and as module) I get:
[42949377.340000] BUG: spinlock already unlocked on CPU#0, swapper/0 [42949377.340000] lock: c02dde74, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0 [42949377.340000] [<c0125f3c>] (dump_stack+0x0/0x14) from [<c0216a30>] (spin_bug+0x90/0xa8) [42949377.340000] [<c02169a0>] (spin_bug+0x0/0xa8) from [<c0216cb4>] (_raw_spin_unlock+0xa0/0xb8) [42949377.340000] r6 = 00000000 r5 = C031F1E4 r4 = C02DDE74 [42949377.340000] [<c0216c14>] (_raw_spin_unlock+0x0/0xb8) from [<c02b0ee4>] (_spin_unlock+0x10/0x14) [42949377.340000] r4 = 00000005 [42949377.340000] [<c02b0ed4>] (_spin_unlock+0x0/0x14) from [<c0121e20>] (asm_do_IRQ+0x11c/0x138) [42949377.340000] [<c0121d04>] (asm_do_IRQ+0x0/0x138) from [<c01505e4>] (__ipipe_sync_stage+0x1f4/0x208) [42949377.340000] [<c01503f0>] (__ipipe_sync_stage+0x0/0x208) from [<c0150810>] (ipipe_suspend_domain+0x7c/0xa8) [42949377.340000] [<c0150794>] (ipipe_suspend_domain+0x0/0xa8) from [<c01509f8>] (__ipipe_walk_pipeline+0x8c/0xc8) [42949377.340000] r8 = 00000001 r7 = C02E05D8 r6 = C02E05E0 r5 = 00000000 [42949377.340000] r4 = C02E05E0 [42949377.340000] [<c015096c>] (__ipipe_walk_pipeline+0x0/0xc8) from [<c0127618>] (__ipipe_handle_irq+0x140/0x1cc) [42949377.340000] r7 = C0365BC0 r6 = 000000A0 r5 = 00000005 r4 = C0367920 [42949377.340000] [<c01274d8>] (__ipipe_handle_irq+0x0/0x1cc) from [<c01276d4>] (__ipipe_grab_irq+0x30/0xe8) [42949377.340000] [<c01276a4>] (__ipipe_grab_irq+0x0/0xe8) from [<c0120844>] (__irq_svc+0x24/0xd4) [42949377.340000] [<c01226c4>] (default_idle+0x0/0x68) from [<c012276c>] (cpu_idle+0x40/0x5c) [42949377.340000] [<c012272c>] (cpu_idle+0x0/0x5c) from [<c0120024>] (__init_end+0x24/0x2c) [42949377.340000] r6 = C02DDE6C r5 = C032029C r4 = C037E6D0 [42949377.340000] [<c0120000>] (__init_end+0x0/0x2c) from [<c0108920>] (start_kernel+0x120/0x16c) [42949377.340000] [<c0108800>] (start_kernel+0x0/0x16c) from [<00108094>] (0x108094) [42949377.340000] r4 = 00053175
/*
* do_IRQ handles all hardware IRQ's. Decoded IRQs should not
* come via this function. Instead, they should provide their
* own 'handler'
*/
asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
struct irqdesc *desc = irq_desc + irq;
/*
* Some hardware gives randomly wrong interrupts. Rather
* than crashing, do something sensible.
*/
if (irq >= NR_IRQS)
desc = &bad_irq_desc;
irq_enter();
spin_lock(&irq_controller_lock);
desc_handle_irq(irq, desc, regs);// unlocks irq_controller_lock
/*
* Now re-run any pending interrupts.
*/
if (!list_empty(&irq_pending))
do_pending_irqs(regs);
irq_finish(irq);
spin_unlock(&irq_controller_lock);
irq_exit();
}Is this normal, or could this also depend on a "main-bug".
2. switchtest
is running normally
3. switchbench
switchtest works with periods of about 10000 us
-sh-3.00# ./run -- -p 10000
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 10000 us
== Do not interrupt this program
RTH| lat min| lat avg| lat max| lost RTD| 77039| 89337| 150824| 0
works, but
./run -- -n 100 -p 100 (switchbench)
Most of time the system simply stands still (no more timer-activity), but here i've a kernel-fault with debug-symbols:
[ 53.650000] Unable to handle kernel NULL pointer dereference at virtual address 00000004 [ 53.650000] pgd = c34c4000 [ 53.650000] [00000004] *pgd=03b9f031, *pte=00000000, *ppte=00000000 [ 53.650000] Internal error: Oops: 17 [#1] [ 53.650000] Modules linked in: [ 53.650000] CPU: 0 [ 53.650000] PC is at xnpod_schedule+0x57c/0x7ec [ 53.650000] LR is at xnpod_schedule+0x570/0x7ec [ 53.650000] pc : [<c01573e8>] lr : [<c01573dc>] Not tainted [ 53.650000] sp : c347fddc ip : c354a044 fp : c347fe10 [ 53.650000] r10: c0368e30 r9 : c00c292c r8 : 00000000 [ 53.650000] r7 : 3a485725 r6 : 00000000 r5 : c3487ab4 r4 : ffffffff [ 53.650000] r3 : 00000000 r2 : 00000000 r1 : c00c292c r0 : c354a000 [ 53.650000] Flags: NzCv IRQs off FIQs on Mode SVC_32 Segment user [ 53.650000] Control: 5317F Table: 034C4000 DAC: 00000015 [ 53.650000] Process worker (pid: 100, stack limit = 0xc347e194) [ 53.650000] Stack: (0xc347fddc to 0xc3480000) [ 53.650000] fdc0: c0368e00 [ 53.650000] fde0: c00c292c 00000000 00000000 c0368e00 00000100 c02e05c0 00000001 c347fe38 [ 53.650000] fe00: c347fe0c c01579e4 c0156e7c c0368e00 00000001 00000000 c347e000 c02e05c0 [ 53.650000] fe20: 00000001 c00c292c 00000000 c347fe70 c347fe3c c015c6f4 c0157834 00000000 [ 53.650000] fe40: c0153990 00000001 c0367050 c00c292c c0365fc0 c0365ba0 20000093 00000001 [ 53.650000] fe60: 00000000 c347fe8c c347fe74 c0157be8 c015c52c c00c2f20 c0367050 c0365ba0 [ 53.650000] fe80: c347fe9c c347fe90 c0158950 c0157b38 c347feb4 c347fea0 c01539ec c015890c [ 53.650000] fea0: 00000000 c348000c c347fec8 c347feb8 c0245040 c01539dc 00000000 c347ff0c [ 53.650000] fec0: c347fecc c01506f0 c0244ff8 00000000 00000001 c0367900 c0365ba0 c348000c [ 53.650000] fee0: 00000000 c02de2cc c3480040 c02e05d8 c0367380 c02e05d8 c02de33c 00000017 [ 53.650000] ff00: c347ff4c c347ff10 c0128aa0 c0150608 20000013 ffffffff c348000c 00000017 [ 53.650000] ff20: 00000004 c02de2cc c3480040 c02e05d8 c0367380 c02e05d8 c02de33c 00000017 [ 53.650000] ff40: c3480008 c347ff50 c0128e68 c01288f8 c347ff5c c0127834 c348000c 00000004 [ 53.650000] ff60: 00000000 00000008 00000008 000f0042 60000013 c347e000 00000000 00000000 [ 53.650000] ff80: c347ff8c c0120e4c c01277e0 2001022b 00014240 c347fff0 00000000 00000000 [ 53.650000] ffa0: 00000000 00000008 ffffffff 00014240 c347fff0 00000000 00000000 00000008 [ 53.650000] ffc0: 00000008 00000000 0000001b 00000000 00000000 00000000 00010000 be5ffaf8 [ 53.650000] ffe0: ffffffff c3480040 c02e05d8 c0367380 c02e05d8 00000093 c0368e30 c3480088 [ 53.650000] Backtrace: [ 53.650000] Backtrace aborted due to bad frame pointer <c347fe10> [ 53.650000] Code: eb03b755 e24b1030 e8910006 e3510000 (e592a004)
-sh-3.00# ./run -- -p 1000
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 1000 us
== Do not interrupt this program
system doesn't react after a while debugger output
^C
Program received signal SIGSTOP, Stopped (signal). 0xffff000c in ?? ()
(gdb) next
Cannot find bounds of current function (gdb) next
Cannot find bounds of current function (gdb) next
Cannot find bounds of current function (gdb) next
Cannot find bounds of current function (gdb) next
Cannot find bounds of current function (gdb) cont
^CRemote failure reply: E01
(gdb) cont
Remote failure reply: E01
(gdb) cont
Remote failure reply: E01
4. cyclictest
cyclictest runs, if i use the run script (built-in xenomai):
-sh-3.00# ./run
*
*
* Type ^C to stop this application.
*
*
0.10 0.04 0.01 1/26 94
T: 0 ( 94) P:99 I: 1000 C: 22508 Min: 49 Act: 82 Max:
121
but is broken if i call it manually:
-sh-3.00# ./cyclictest
0.10 0.04 0.01 2/23 103
T: 0 ( 103) P: 0 I: 1000 C: 1699 Min:-2660105 Act:-2660105 Max:
-985769
5. latency
For periodic user-mode task i need very high periods > 1000us.
Here are the latency-checks with printk's of the ioctls:
-sh-3.00# ./run -- -t 1
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel periodic task
== All results in microseconds
[42949519.180000] rt_tmbench_ioctl_rt: request 1076364816 -> ret = -ENOTTY(-25) latency: failed to start in-kernel timer benchmark, code -25 [42949523.000000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret = -ENOTTY(-25) ---|------------|------------|------------|--------|------------------------- RTS|-1096532.504| 0.001| 93.252| 93340|
00:00:03/00:00:03
-sh-3.00# ./run -- -t 2
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel timer handler
== All results in microseconds
[42949529.090000] rt_tmbench_ioctl_rt: request 1076364816 -> ret = -ENOTTY(-25) latency: failed to start in-kernel timer benchmark, code -25 [42949534.680000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret = -ENOTTY(-25) ---|------------|------------|------------|--------|------------------------- RTS|-1093751.320| 0.001| 93.252| 93340|
00:00:04/00:00:04
Userspace-codes differ from kernelspace-codes, I think...
6. Cross-Compiled Xenomai (Userspace)
I'm using elinos4.0
./configure --prefix=/ginzinger/bootdir/nfsroot/xeno-2.2.3/ --host arm
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-none
checking for a BSD-compatible install... /usr/bin/install -c checking for arm-gcc... arm_v4le-gcc
checking for C compiler default output file name... a.out checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes checking whether arm_v4le-gcc accepts -g... yes
checking for arm_v4le-gcc option to accept ANSI C... none needed checking how to run the C preprocessor... arm_v4le-gcc -E checking target system type... arm-unknown-none
checking for arm-gcc... no
checking for gcc... gcc
checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... no
checking for gcc option to accept ANSI C... (cached) none needed checking how to run the C preprocessor... gcc -E
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for arm-strip... no
checking for strip... strip
checking dependency style of arm_v4le-gcc... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E
checking for ld used by arm_v4le-gcc... arm_v4le-ld
checking if the linker (arm_v4le-ld) is GNU ld... yes checking for arm_v4le-ld option to reload object files... -r checking for BSD-compatible nm... arm_v4le-nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... unknown checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for arm-g++... arm_v4le-g++
checking whether we are using the GNU C++ compiler... yes checking whether arm_v4le-g++ accepts -g... yes
checking dependency style of arm_v4le-g++... gcc3
checking how to run the C++ preprocessor... arm_v4le-g++ -E checking for arm-g77... no
checking for arm-f77... no
checking for arm-xlf... no
checking for arm-frt... no
checking for arm-pgf77... no
checking for arm-fort77... no
checking for arm-fl32... no
checking for arm-af77... no
checking for arm-f90... no
checking for arm-xlf90... no
checking for arm-pgf90... no
checking for arm-epcf90... no
checking for arm-f95... no
checking for arm-fort... no
checking for arm-xlf95... no
checking for arm-ifc... no
checking for arm-efc... no
checking for arm-pgf95... no
checking for arm-lf95... no
checking for arm-gfortran... no
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768 checking command to parse arm_v4le-nm output from arm_v4le-gcc object... ok
checking for objdir... .libs
checking for arm-ar... arm_v4le-ar
checking for arm-ranlib... arm_v4le-ranlib
checking for arm-strip... strip
checking if arm_v4le-gcc supports -fno-rtti -fno-exceptions... no checking for arm_v4le-gcc option to produce PIC... -fPIC checking if arm_v4le-gcc PIC flag -fPIC works... yes checking if arm_v4le-gcc static flag -static works... yes checking if arm_v4le-gcc supports -c -o file.o... yes checking whether the arm_v4le-gcc linker (arm_v4le-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by arm_v4le-g++... arm_v4le-ld
checking if the linker (arm_v4le-ld) is GNU ld... yes checking whether the arm_v4le-g++ linker (arm_v4le-ld) supports shared libraries... no
checking for arm_v4le-g++ option to produce PIC... -fPIC checking if arm_v4le-g++ PIC flag -fPIC works... yes checking if arm_v4le-g++ static flag -static works... yes checking if arm_v4le-g++ supports -c -o file.o... yes checking whether the arm_v4le-g++ linker (arm_v4le-ld) supports shared libraries... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (arm_v4le-ld) supports shared libraries... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for target architecture... arm
checking for UVM support... y
checking for debug symbols... no
checking for SMP support... no
checking for size of system heap... 128 Kb
checking for ARM architecture version... 4
checking for ARM SA1100 architecture... no
checking whether building Linux in Xenomai build tree... no checking for Doxygen documentation... no
checking for doxygen... no
checking for dot... NO
checking whether compiling Docbook XML documentation... no checking for xmllint... no
checking for xsltproc... xsltproc
checking for fop.sh... no
checking whether Docbook XML documentation generation can use network.... no
checking for docbook-xml root dir... /usr/share/sgml/docbook/dtd/xml/4.2 checking for docbook-xsl root
dir... /usr/share/sgml/docbook/stylesheet/xsl/nwalsh checking whether using LaTeX non-stop mode... no
checking mqueue.h usability... yes
checking mqueue.h presence... yes
checking for mqueue.h... yes
checking for sched_setaffinity... ok
checking for specific GCC switches... done
checking whether ld supports @file... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/xeno-config
config.status: creating scripts/xeno-load
config.status: creating scripts/xeno-test
config.status: creating src/Makefile
config.status: creating src/skins/Makefile
config.status: creating src/skins/posix/Makefile config.status: creating src/skins/native/Makefile config.status: creating src/skins/vxworks/Makefile config.status: creating src/skins/vrtx/Makefile config.status: creating src/skins/rtdm/Makefile config.status: creating src/skins/rtai/Makefile config.status: creating src/skins/uvm/Makefile config.status: creating src/skins/uvm/nucleus/Makefile config.status: creating src/skins/uvm/vxworks/Makefile config.status: creating src/skins/uvm/psos+/Makefile config.status: creating src/skins/uvm/vrtx/Makefile config.status: creating src/skins/uvm/uitron/Makefile config.status: creating src/include/Makefile
config.status: creating src/testsuite/Makefile config.status: creating src/testsuite/latency/Makefile config.status: creating src/testsuite/switchbench/Makefile config.status: creating src/testsuite/cyclic/Makefile config.status: creating src/testsuite/switchtest/Makefile config.status: creating src/testsuite/irqbench/Makefile config.status: creating include/Makefile
config.status: creating include/asm-generic/Makefile config.status: creating include/asm-blackfin/Makefile config.status: creating include/asm-i386/Makefile config.status: creating include/asm-powerpc/Makefile config.status: creating include/asm-ia64/Makefile config.status: creating include/asm-arm/Makefile config.status: creating include/asm-uvm/Makefile config.status: creating include/asm-sim/Makefile config.status: creating include/native/Makefile config.status: creating include/nucleus/Makefile config.status: creating include/posix/Makefile config.status: creating include/posix/sys/Makefile config.status: creating include/psos+/Makefile config.status: creating include/rtai/Makefile
config.status: creating include/rtdm/Makefile
config.status: creating include/uitron/Makefile config.status: creating include/vrtx/Makefile
config.status: creating include/vxworks/Makefile config.status: creating doc/Makefile
config.status: creating doc/txt/Makefile
config.status: creating doc/man/Makefile
config.status: creating doc/man/runinfo.man
config.status: creating doc/man/xeno-config.man config.status: creating doc/man/xeno-info.man
config.status: creating doc/man/xeno-load.man
config.status: creating doc/man/xeno-test.man
config.status: creating doc/doxygen/Makefile
config.status: creating doc/doxygen/Doxyfile
config.status: creating doc/docbook/Makefile
config.status: creating doc/docbook/catalog
config.status: creating doc/docbook/custom-stylesheets/Makefile config.status: creating doc/docbook/custom-stylesheets/xsl/Makefile config.status: creating doc/docbook/custom-stylesheets/xsl/common/Makefile config.status: creating doc/docbook/custom-stylesheets/xsl/fo/Makefile config.status: creating doc/docbook/custom-stylesheets/xsl/html/Makefile config.status: creating doc/docbook/custom-stylesheets/xsl/html/chunk.xsl config.status: creating doc/docbook/custom-stylesheets/xsl/html/onechunk.xsl config.status: creating doc/docbook/xenomai/Makefile config.status: creating src/include/xeno_config.h config.status: src/include/xeno_config.h is unchanged config.status: linking ./include/asm-arm to src/include/asm/xenomai config.status: linking ./include/asm-generic to src/include/asm-generic/xenomai
config.status: executing depfiles commands
Quoted 41 lines · Schlägl Manfred jun.
5. latency
For periodic user-mode task i need very high periods > 1000us.
Here are the latency-checks with printk's of the ioctls:
-sh-3.00# ./run -- -t 1
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel periodic task
== All results in microseconds[42949519.180000] rt_tmbench_ioctl_rt: request 1076364816 -> ret = -ENOTTY(-25) latency: failed to start in-kernel timer benchmark, code -25 [42949523.000000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret = -ENOTTY(-25) ---|------------|------------|------------|--------|------------------------- RTS|-1096532.504| 0.001| 93.252| 93340|00:00:03/00:00:03
-sh-3.00# ./run -- -t 2
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel timer handler
== All results in microseconds[42949529.090000] rt_tmbench_ioctl_rt: request 1076364816 -> ret = -ENOTTY(-25) latency: failed to start in-kernel timer benchmark, code -25 [42949534.680000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret = -ENOTTY(-25) ---|------------|------------|------------|--------|------------------------- RTS|-1093751.320| 0.001| 93.252| 93340|
Quoted 4 lines
00:00:04/00:00:04
Userspace-codes differ from kernelspace-codes, I think...
Yes it does!!!
#define RTTST_RTIOC_TMBENCH_START \
_IOW(RTIOC_TYPE_TESTING, 0x10, struct rttst_tmbench_config) two different results in kernel-/user-space
sizeof(struct rttst_tmbench_config)
-> kernel 32
-> user 40
typedef struct rttst_tmbench_config {
int mode;
uint64_t period;
int priority;
int warmup_loops;
int histogram_size;
int histogram_bucketsize;
int freeze_max;
} rttst_tmbench_config_t;sizeof(struct rttst_tmbench_config_t)
-> kernel 32 (uses packed-structure)
-> user 40 (uses unpacked-structure)
sizeof(uint64_t)
-> kernel 8
-> user 8
sizeof(int)
-> kernel 4
-> user 4
Difference has something to do with the internal structure of rttst_tmbench_config.
Solution 1: Force userspace-app and kernel to use packed structure
--------------
typedef struct rttst_tmbench_config {
int mode;
uint64_t period;
int priority;
int warmup_loops;
int histogram_size;
int histogram_bucketsize;
int freeze_max;
} __attribute__((packed)) rttst_tmbench_config_t;sizeof(struct rttst_tmbench_config_t)
-> kernel 32 (uses packed-structure)
-> user 32 (uses packed-structure)
Has to be done to all structures! (compiler-flag -fpack-struct)
Problems:
* problems with libs (see
http://gcc.gnu.org/ml/gcc-help/2005-01/msg00257.html)
* possibly problems with typedef ????
Solution 2: Force userspace-app and kernel to use unpacked structure
--------------
typedef struct rttst_tmbench_config {
int mode;
uint64_t period;
int priority;
int warmup_loops;
int histogram_size;
int histogram_bucketsize;
int freeze_max;
} __attribute__((unpacked)) rttst_tmbench_config_t;Kernel ignores the attribute!
Theoretically:sizeof(struct rttst_tmbench_config_t)
-> kernel 40 (uses unpacked-structure)
-> user 40 (uses unpacked-structure)
Has to be done to all structures!
Solution 3:
--------------
change kernel-configuration to use unpacked structures by default.
- Manfred Schlaegl
Quoted 135 lines · Schlägl Manfred jun.
Quoted 41 lines · Schlägl Manfred jun.
5. latency
For periodic user-mode task i need very high periods > 1000us.
Here are the latency-checks with printk's of the ioctls:
-sh-3.00# ./run -- -t 1
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel periodic task
== All results in microseconds[42949519.180000] rt_tmbench_ioctl_rt: request 1076364816 -> ret = -ENOTTY(-25) latency: failed to start in-kernel timer benchmark, code -25 [42949523.000000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret = -ENOTTY(-25) ---|------------|------------|------------|--------|------------------------- RTS|-1096532.504| 0.001| 93.252| 93340|00:00:03/00:00:03
-sh-3.00# ./run -- -t 2
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel timer handler
== All results in microseconds[42949529.090000] rt_tmbench_ioctl_rt: request 1076364816 -> ret = -ENOTTY(-25) latency: failed to start in-kernel timer benchmark, code -25 [42949534.680000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret = -ENOTTY(-25) ---|------------|------------|------------|--------|------------------------- RTS|-1093751.320| 0.001| 93.252| 93340|Quoted 4 lines
00:00:04/00:00:04
Userspace-codes differ from kernelspace-codes, I think...
Yes it does!!!
#define RTTST_RTIOC_TMBENCH_START \ _IOW(RTIOC_TYPE_TESTING, 0x10, struct rttst_tmbench_config)two different results in kernel-/user-space
sizeof(struct rttst_tmbench_config)
-> kernel 32
-> user 40typedef struct rttst_tmbench_config { int mode; uint64_t period; int priority; int warmup_loops; int histogram_size; int histogram_bucketsize; int freeze_max; } rttst_tmbench_config_t;
sizeof(struct rttst_tmbench_config_t)
-> kernel 32 (uses packed-structure)
-> user 40 (uses unpacked-structure)
sizeof(uint64_t)
-> kernel 8
-> user 8sizeof(int)
-> kernel 4
-> user 4Difference has something to do with the internal structure of
rttst_tmbench_config.Solution 1: Force userspace-app and kernel to use packed structure
--------------typedef struct rttst_tmbench_config { int mode; uint64_t period; int priority; int warmup_loops; int histogram_size; int histogram_bucketsize; int freeze_max; } __attribute__((packed)) rttst_tmbench_config_t;
sizeof(struct rttst_tmbench_config_t)
-> kernel 32 (uses packed-structure)
-> user 32 (uses packed-structure)Has to be done to all structures! (compiler-flag -fpack-struct)
Problems:
* problems with libs (see
http://gcc.gnu.org/ml/gcc-help/2005-01/msg00257.html)
* possibly problems with typedef ????Solution 2: Force userspace-app and kernel to use unpacked structure
--------------typedef struct rttst_tmbench_config { int mode; uint64_t period; int priority; int warmup_loops; int histogram_size; int histogram_bucketsize; int freeze_max; } __attribute__((unpacked)) rttst_tmbench_config_t;Kernel ignores the attribute!
Theoretically:
sizeof(struct rttst_tmbench_config_t)
-> kernel 40 (uses unpacked-structure)
-> user 40 (uses unpacked-structure)
Quoted 9 lines
Has to be done to all structures!
Solution 3:
--------------
change kernel-configuration to use unpacked structures by default.
I vote for solution 4:
rtdm/rttesting.h (working copy) renamed from rtdm/rttesting.h (revision 1731) +1 -1
@@ -85,8 +85,8 @@ typedef struct rttst_overall_bench_res { typedef struct rttst_tmbench_config { int mode; - nanosecs_rel_t period; int priority; + nanosecs_rel_t period; int warmup_loops; int histogram_size; int histogram_bucketsize;
Could you check if this helps?
Thanks,
Jan
Quoted 15 lines · Jan Kiszka
I vote for solution 4:
rtdm/rttesting.h (working copy) renamed from rtdm/rttesting.h (revision 1731) +1
-1@@ -85,8 +85,8 @@ typedef struct rttst_overall_bench_res { typedef struct rttst_tmbench_config { int mode; - nanosecs_rel_t period; int priority; + nanosecs_rel_t period; int warmup_loops; int histogram_size; int histogram_bucketsize;
Quoted 5 lines
Could you check if this helps?
Thanks,
Jan
Thanks! It works. ioctls are working
But there is another Problem: I've inserted debug messages
// USER-PROCESS
-sh-3.00# ./run -- -t 1 -p 10000 -T 5
*
*
* Type ^C to stop this application.
*
*
Using /lib/modules/2.6.15.7/kernel/drivers/xenomai/testing/xeno_timerbench.ko == Sampling period: 10000 us
== Test mode: in-kernel periodic task
== All results in microseconds
LATENCY: display send RTTST_RTIOC_TMBENCH_START:
mode 0
periode 1
pri 99 warmup 1 hist_s 0
hist_bs 1000
fmax 0
DEBUG: rt_dev_ioctl: request: 1075840528
warming up...
DEBUG: rt_dev_ioctl: request: -1070594560
RTT| 00:00:01 (in-kernel periodic task, 10000 us period, priority 99) RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat
worst
RTD| 29.369| 32.341| 35.879| 0| 29.369|
35.879
DEBUG: rt_dev_ioctl: request: -1070594560
RTD| 22.135| 32.381| 36.241| 0| 22.135|
36.241
DEBUG: rt_dev_ioctl: request: -1070594560
RTD| 21.050| 32.378| 37.326| 0| 21.050|
37.326
DEBUG: rt_dev_ioctl: request: -1070594560
DEBUG: rt_dev_ioctl: request: -1071118831
---|------------|------------|------------|--------|------------------------- RTS|-1095770.696| 0.001| 93.660| 93748|
00:00:05/00:00:05
-sh-3.00#
// KERNEL-OUTPUT
[42949410.980000] KERNEL: rt_tmbench_ioctl_nrt got request 1075840528 [42949410.990000] KERNEL: rt_tmbench_ioctl_nrt got RTTST_RTIOC_TMBENCH_START: [42949411.020000] mode 0 [42949411.020000] periode 10000000 [42949411.030000] pri 99 [42949411.040000] warmup 1 [42949411.050000] hist_s 0 [42949411.060000] hist_bs 1000 [42949411.070000] fmax 0 [42949411.080000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949411.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949411.120000] rt_tmbench_ioctl_rt -1070594560 [42949413.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949413.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949413.120000] rt_tmbench_ioctl_rt -1070594560 [42949414.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949414.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949414.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949415.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949415.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.290000] KERNEL: rt_tmbench_ioctl_nrt got request -1071118831 [42949415.310000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret =
-ENOTTY(-25)
The RTTST_RTIOC_INTERM_BENCH_RES request is received by rt_tmbench_ioctl_nrt and rt_tmbench_ioctl_rt. Is this normal on arm? (on my x86 this happens only at the beginning of a test-run)
Thank you
Manfred Schlaegl
Quoted 17 lines · Schlägl Manfred jun.
Quoted 15 lines · Jan Kiszka
I vote for solution 4:
rtdm/rttesting.h (working copy) renamed from rtdm/rttesting.h (revision 1731) +1
-1@@ -85,8 +85,8 @@ typedef struct rttst_overall_bench_res { typedef struct rttst_tmbench_config { int mode; - nanosecs_rel_t period; int priority; + nanosecs_rel_t period; int warmup_loops; int histogram_size; int histogram_bucketsize;
Quoted 8 lines
Quoted 5 lines
Could you check if this helps?
Thanks,
JanThanks! It works. ioctls are working
Ok, I will apply the patch.
Quoted 73 lines
But there is another Problem: I've inserted debug messages
// USER-PROCESS
-sh-3.00# ./run -- -t 1 -p 10000 -T 5
*
*
* Type ^C to stop this application.
*
*
Using/lib/modules/2.6.15.7/kernel/drivers/xenomai/testing/xeno_timerbench.ko== Sampling period: 10000 us
== Test mode: in-kernel periodic task
== All results in microseconds
LATENCY: display sendRTTST_RTIOC_TMBENCH_START:
mode 0
periode 1pri 99 warmup 1 hist_s 0
hist_bs1000
fmax 0
DEBUG:rt_dev_ioctl: request: 1075840528
warming up...
DEBUG:rt_dev_ioctl: request: -1070594560RTT| 00:00:01 (in-kernel periodic task, 10000 us period, priority 99) RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---latworst
RTD| 29.369| 32.341| 35.879| 0| 29.369|
35.879
DEBUG:rt_dev_ioctl: request: -1070594560
RTD| 22.135| 32.381| 36.241| 0| 22.135|
36.241
DEBUG:rt_dev_ioctl: request: -1070594560
RTD| 21.050| 32.378| 37.326| 0| 21.050|
37.326
DEBUG:rt_dev_ioctl: request: -1070594560
DEBUG:rt_dev_ioctl: request: -1071118831---|------------|------------|------------|--------|------------------------- RTS|-1095770.696| 0.001| 93.660| 93748|00:00:05/00:00:05
-sh-3.00#// KERNEL-OUTPUT
[42949410.980000] KERNEL: rt_tmbench_ioctl_nrt got request 1075840528 [42949410.990000] KERNEL: rt_tmbench_ioctl_nrt got RTTST_RTIOC_TMBENCH_START: [42949411.020000] mode 0 [42949411.020000] periode 10000000 [42949411.030000] pri 99 [42949411.040000] warmup 1 [42949411.050000] hist_s 0 [42949411.060000] hist_bs 1000 [42949411.070000] fmax 0 [42949411.080000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949411.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949411.120000] rt_tmbench_ioctl_rt -1070594560 [42949413.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949413.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949413.120000] rt_tmbench_ioctl_rt -1070594560 [42949414.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949414.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949414.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949415.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949415.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.290000] KERNEL: rt_tmbench_ioctl_nrt got request -1071118831 [42949415.310000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret =
Quoted 7 lines
-ENOTTY(-25)
The
RTTST_RTIOC_INTERM_BENCH_RESrequest is received byrt_tmbench_ioctl_nrtandrt_tmbench_ioctl_rt. Is this normal on arm? (on my x86 this happens only at the beginning of a test-run)
Remove your instrumentation printfs from the user space part. They always switch the task to secondary mode in order to dump the messages.
Jan
Quoted 7 lines · Jan Kiszka
Quoted 3 lines
The
RTTST_RTIOC_INTERM_BENCH_RESrequest is received byrt_tmbench_ioctl_nrtandrt_tmbench_ioctl_rt. Is this normal on arm? (on my x86 this happens only at the beginning of a test-run)Remove your instrumentation printfs from the user space part. They always switch the task to secondary mode in order to dump the messages.
Another reason why latency may switch to secondary mode is the hardware FPU emulation. In order to avoid that, if your toolchain is compiling for hardware floats by default, you should pass CFLAGS=-msoft-float to configure.
Signature · 1 line
Gilles Chanteperdrix
Quoted 107 lines · Schlägl Manfred jun.
Quoted 15 lines · Jan Kiszka
I vote for solution 4:
rtdm/rttesting.h (working copy) renamed from rtdm/rttesting.h (revision 1731) +1
-1@@ -85,8 +85,8 @@ typedef struct rttst_overall_bench_res { typedef struct rttst_tmbench_config { int mode; - nanosecs_rel_t period; int priority; + nanosecs_rel_t period; int warmup_loops; int histogram_size; int histogram_bucketsize;Quoted 5 lines
Could you check if this helps?
Thanks,
JanThanks! It works. ioctls are working
But there is another Problem: I've inserted debug messages
// USER-PROCESS
-sh-3.00# ./run -- -t 1 -p 10000 -T 5
*
*
* Type ^C to stop this application.
*
*
Using/lib/modules/2.6.15.7/kernel/drivers/xenomai/testing/xeno_timerbench.ko== Sampling period: 10000 us
== Test mode: in-kernel periodic task
== All results in microseconds
LATENCY: display sendRTTST_RTIOC_TMBENCH_START:
mode 0
periode 1pri 99 warmup 1 hist_s 0
hist_bs1000
fmax 0
DEBUG:rt_dev_ioctl: request: 1075840528
warming up...
DEBUG:rt_dev_ioctl: request: -1070594560RTT| 00:00:01 (in-kernel periodic task, 10000 us period, priority 99) RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---latworst
RTD| 29.369| 32.341| 35.879| 0| 29.369|
35.879
DEBUG:rt_dev_ioctl: request: -1070594560
RTD| 22.135| 32.381| 36.241| 0| 22.135|
36.241
DEBUG:rt_dev_ioctl: request: -1070594560
RTD| 21.050| 32.378| 37.326| 0| 21.050|
37.326
DEBUG:rt_dev_ioctl: request: -1070594560
DEBUG:rt_dev_ioctl: request: -1071118831---|------------|------------|------------|--------|------------------------- RTS|-1095770.696| 0.001| 93.660| 93748|00:00:05/00:00:05
-sh-3.00#// KERNEL-OUTPUT
[42949410.980000] KERNEL: rt_tmbench_ioctl_nrt got request 1075840528 [42949410.990000] KERNEL: rt_tmbench_ioctl_nrt got RTTST_RTIOC_TMBENCH_START: [42949411.020000] mode 0 [42949411.020000] periode 10000000 [42949411.030000] pri 99 [42949411.040000] warmup 1 [42949411.050000] hist_s 0 [42949411.060000] hist_bs 1000 [42949411.070000] fmax 0 [42949411.080000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949411.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949411.120000] rt_tmbench_ioctl_rt -1070594560 [42949413.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949413.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949413.120000] rt_tmbench_ioctl_rt -1070594560 [42949414.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949414.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949414.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949415.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949415.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.290000] KERNEL: rt_tmbench_ioctl_nrt got request -1071118831 [42949415.310000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret =-ENOTTY(-25)
The
RTTST_RTIOC_INTERM_BENCH_RESrequest is received byrt_tmbench_ioctl_nrtandrt_tmbench_ioctl_rt. Is this normal on arm? (on my x86 this happens only at the beginning of a test-run)
Quoted 8 lines
Thank you
Manfred Schlaegl_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Like above i had a problem using RTTST_RTIOC_TMBENCH_STOP too.
typedef struct rttst_bench_res {
long long avg;
long min;
long max;
long overruns;
long test_loops;
} rttst_bench_res_t;typedef struct rttst_overall_bench_res {
struct rttst_bench_res result;
long *histogram_avg;
long *histogram_min;
long *histogram_max;
} rttst_overall_bench_res_t;sizeof(struct rttst_bench_res):
Kernel 24
User 24
sizeof(struct rttst_overall_bench_res):
Kernel 36
User 40
I used this Patch:
typedef struct rttst_overall_bench_res {
struct rttst_bench_res result;
+ char __fill; /* fill byte */
long *histogram_avg;
long *histogram_min;
long *histogram_max;} rttst_overall_bench_res_t;
sizeof(struct rttst_overall_bench_res):
Kernel 40
User 40
- Manfred
Quoted 154 lines · Schlägl Manfred jun.
Quoted 106 lines · Schlägl Manfred jun.
Quoted 15 lines · Jan Kiszka
I vote for solution 4:
rtdm/rttesting.h (working copy) renamed from rtdm/rttesting.h (revision 1731) +1
-1@@ -85,8 +85,8 @@ typedef struct rttst_overall_bench_res { typedef struct rttst_tmbench_config { int mode; - nanosecs_rel_t period; int priority; + nanosecs_rel_t period; int warmup_loops; int histogram_size; int histogram_bucketsize;Quoted 5 lines
Could you check if this helps?
Thanks,
JanThanks! It works. ioctls are working
But there is another Problem: I've inserted debug messages
// USER-PROCESS
-sh-3.00# ./run -- -t 1 -p 10000 -T 5
*
*
* Type ^C to stop this application.
*
*
Using/lib/modules/2.6.15.7/kernel/drivers/xenomai/testing/xeno_timerbench.ko== Sampling period: 10000 us
== Test mode: in-kernel periodic task
== All results in microseconds
LATENCY: display sendRTTST_RTIOC_TMBENCH_START:
mode 0
periode 1pri 99 warmup 1 hist_s 0
hist_bs1000
fmax 0
DEBUG:rt_dev_ioctl: request: 1075840528
warming up...
DEBUG:rt_dev_ioctl: request: -1070594560RTT| 00:00:01 (in-kernel periodic task, 10000 us period, priority 99) RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---latworst
RTD| 29.369| 32.341| 35.879| 0| 29.369|
35.879
DEBUG:rt_dev_ioctl: request: -1070594560
RTD| 22.135| 32.381| 36.241| 0| 22.135|
36.241
DEBUG:rt_dev_ioctl: request: -1070594560
RTD| 21.050| 32.378| 37.326| 0| 21.050|
37.326
DEBUG:rt_dev_ioctl: request: -1070594560
DEBUG:rt_dev_ioctl: request: -1071118831---|------------|------------|------------|--------|------------------------- RTS|-1095770.696| 0.001| 93.660| 93748|00:00:05/00:00:05
-sh-3.00#// KERNEL-OUTPUT
[42949410.980000] KERNEL: rt_tmbench_ioctl_nrt got request 1075840528 [42949410.990000] KERNEL: rt_tmbench_ioctl_nrt got RTTST_RTIOC_TMBENCH_START: [42949411.020000] mode 0 [42949411.020000] periode 10000000 [42949411.030000] pri 99 [42949411.040000] warmup 1 [42949411.050000] hist_s 0 [42949411.060000] hist_bs 1000 [42949411.070000] fmax 0 [42949411.080000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949411.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949411.120000] rt_tmbench_ioctl_rt -1070594560 [42949413.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949413.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949413.120000] rt_tmbench_ioctl_rt -1070594560 [42949414.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949414.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949414.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.070000] KERNEL: rt_tmbench_ioctl_nrt got request -1070594560 [42949415.090000] rt_tmbench_ioctl_nrt: request -1070594560(RTTST_RTIOC_INTERM_BENCH_RES) -> ret = -ENOSYS(-38) [42949415.120000] rt_tmbench_ioctl_rt -1070594560 [42949415.290000] KERNEL: rt_tmbench_ioctl_nrt got request -1071118831 [42949415.310000] rt_tmbench_ioctl_nrt: request -1071118831 -> ret =-ENOTTY(-25)
The
RTTST_RTIOC_INTERM_BENCH_RESrequest is received byrt_tmbench_ioctl_nrtandrt_tmbench_ioctl_rt. Is this normal on arm? (on my x86 this happens only at the beginning of a test-run)Quoted 8 lines
Thank you
Manfred Schlaegl_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-helpLike above i had a problem using
RTTST_RTIOC_TMBENCH_STOPtoo.typedef struct rttst_bench_res { long long avg; long min; long max; long overruns; long test_loops; } rttst_bench_res_t;typedef struct rttst_overall_bench_res { struct rttst_bench_res result; long *histogram_avg; long *histogram_min; long *histogram_max; } rttst_overall_bench_res_t;
sizeof(struct rttst_bench_res):
Kernel 24
User 24
sizeof(struct rttst_overall_bench_res):
Kernel 36
User 40I used this Patch:
typedef struct rttst_overall_bench_res { struct rttst_bench_res result; + char __fill; /* fill byte */ long *histogram_avg; long *histogram_min; long *histogram_max;
Quoted 6 lines
}
rttst_overall_bench_res_t;
sizeof(struct rttst_overall_bench_res):
Kernel 40
User 40
Damn it. What alignment of the compiler is behind this? Fill up to multiples of X bytes, ok. But how to find out what X is on some platform? Anyone any hint on this?
Thanks for tracking down.
Jan
Quoted 9 lines
Damn it. What alignment of the compiler is behind this? Fill up to multiples of X bytes, ok. But how to find out what X is on some platform? Anyone any hint on this?
Thanks for tracking down.
Jan
I've found it:
The Kernel is compiled with -mabi=apcs-gnu
With this flag
typedef struct test1 {
int mode;
unsigned long long period;
int priority;
int warmup_loops;
int histogram_size;
int histogram_bucketsize;
int freeze_max;
} test1_t;With flag -> size = 32
Without flag -> size = 40
I'll try to find a solution.
- Manfred
On Tue, 2006-10-17 at 17:39 +0200, Schlägl Manfred jun. wrote:
[...]
Quoted 2 lines
1. With enabled kernel-debugging (
spin_debug), while loadingxeno_native(built-in and as module) I get:
[...]
Quoted 2 lines
Is this normal, or could this also depend on a "main-bug".
No, that's absolutely abnormal. Switching the Linux kernel debug options on is the usual way most of us work, and no warning should be emitted under Xenomai operations. What you get on ARM, and which I cannot reproduce on x86, ppc or blackfin, is worrying.
[...]
Quoted 8 lines
./run -- -n 100 -p 100 (switchbench)
Most of time the system simply stands still (no more timer-activity), but here i've a kernel-fault with debug-symbols:
[ 53.650000] Unable to handle kernel NULL pointer dereference atvirtual address 00000004
We might have a stack overflow here, as a consequence of the shorter sampling period.
[...]
Quoted 15 lines
4. cyclictest
cyclictest runs, if i use the run script (built-in xenomai):-sh-3.00# ./run
*
*
* Type ^C to stop this application.
*
*
0.10 0.04 0.01 1/26 94T: 0 ( 94) P:99 I: 1000 C: 22508 Min: 49 Act: 82 Max:
121
Quoted 8 lines
but is broken if i call it manually:
-sh-3.00# ./cyclictest
0.10 0.04 0.01 2/23 103T: 0 ( 103) P: 0 I: 1000 C: 1699 Min:-2660105 Act:-2660105 Max:
-985769
It's not actually broken, it's just that we have imported this code from the PREEMPT_RT testsuite, and their default setup does not match our testcase. You should at least pass -n to the test.
Signature · 1 line
Philippe.
Quoted 12 lines · Philippe Gerum
On Tue, 2006-10-17 at 17:39 +0200, Schlägl Manfred jun. wrote:
[...]
Quoted 2 lines
1. With enabled kernel-debugging (
spin_debug), while loadingxeno_native(built-in and as module) I get:[...]
Quoted 8 lines
Quoted 2 lines
Is this normal, or could this also depend on a "main-bug".
No, that's absolutely abnormal. Switching the Linux kernel debug options on is the usual way most of us work, and no warning should be emitted under Xenomai operations. What you get on ARM, and which I cannot reproduce on x86, ppc or blackfin, is worrying.
Some ARMs do not boot when spinlock debugging is enabled, so it would be interesting to check if the error also occurs with I-pipe and Xenomai off.
Signature · 1 line
Gilles Chanteperdrix