Skip to contentSkip to conversation

Problems running testsuite

Xenomai-help Applied Tobias Marschall 5 participants 15 messages Apr 13, 2006 – Apr 17, 2006

lore
Share & tools
lore
#0 lore raw

Hallo,

I've been using rtai until now and decided to give xenomai (release 2.1) a try. I followed the instructions from README.INSTALL, and everything (kernel patching, compilation, etc.) went fine. Then I tried to run the latency test, which failed:

-----------
/usr/xenomai/testsuite/latency $ ./run
head: -1' option is obsolete; use -n 1' since this will be removed in the future
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5936 Killed $suflag $*
$cmdargs
-----------

The same for "switch", the same if I call ./latency directly.

Is it correct that the xeno_timerbench module is required for the latency test? I get the same result wheter or not I load the module.

What am I doing wrong?

Thanks in advance and best regards,
Tobias

Some (hopefully useful) information follows:
-----------
/usr/xenomai/bin $ ./xeno-info
If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.

Linux tobi 2.6.14 #3 PREEMPT Thu Apr 13 09:13:53 CEST 2006 i686 AMD Athlon(tm) XP 1600+ AuthenticAMD GNU/Linux

Gnu C                  3.3.6
Gnu make               3.80
util-linux             2.12r
mount                  2.12r
module-init-tools      3.2.1
e2fsprogs              1.38
Linux C Library        2.3.5
head: `-1' option is obsolete; use `-n 1' since this will be removed in the 
future
Dynamic linker (ldd)   2.3.5
Procps                 3.2.5
Net-tools              1.60
Kbd                    1.12
Sh-utils               5.2.1
Modules Loaded         xeno_timerbench

-----------
~ $ dmesg|grep -i xenomai
I-pipe: Domain Xenomai registered.
Xenomai: hal/x86 started.
Xenomai: real-time nucleus v2.1 (Champagne) loaded.
Xenomai: starting native API services.
Xenomai: starting RTDM services.
-----------
/usr/src/linux $ grep -3i xeno .config
#
# Real-time sub-system
#
CONFIG_XENOMAI=y
CONFIG_XENO_OPT_NUCLEUS=y CONFIG_XENO_OPT_PERVASIVE=y CONFIG_XENO_OPT_PIPE=y CONFIG_XENO_OPT_PIPE_NRDEV=32 CONFIG_XENO_OPT_REGISTRY=y CONFIG_XENO_OPT_REGISTRY_NRSLOTS=512 CONFIG_XENO_OPT_SYS_HEAPSZ=128
# CONFIG_XENO_OPT_ISHIELD is not set CONFIG_XENO_OPT_STATS=y
# CONFIG_XENO_OPT_DEBUG is not set
# CONFIG_XENO_OPT_WATCHDOG is not set

#
# Timing
#
CONFIG_XENO_OPT_TIMING_PERIODIC=y
CONFIG_XENO_OPT_TIMING_PERIOD=0
CONFIG_XENO_OPT_TIMING_TIMERLAT=0
CONFIG_XENO_OPT_TIMING_SCHEDLAT=0

#
# Scalability
#
# CONFIG_XENO_OPT_SCALABLE_SCHED is not set
CONFIG_XENO_OPT_TIMER_LIST=y
# CONFIG_XENO_OPT_TIMER_HEAP is not set

#
# Shared interrupts
#
# CONFIG_XENO_OPT_SHIRQ_LEVEL is not set
# CONFIG_XENO_OPT_SHIRQ_EDGE is not set

#
# Machine
#
CONFIG_XENO_HW_FPU=y

#
# NMI watchdog
#
# CONFIG_XENO_HW_NMI_DEBUG_LATENCY is not set

#
# SMI workaround
#
# CONFIG_XENO_HW_SMI_DETECT_DISABLE is not set
CONFIG_XENO_HW_SMI_DETECT=y
# CONFIG_XENO_HW_SMI_WORKAROUND is not set

#
# Interfaces
#
CONFIG_XENO_SKIN_NATIVE=y
CONFIG_XENO_OPT_NATIVE_PIPE=y
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=4096
CONFIG_XENO_OPT_NATIVE_SEM=y
CONFIG_XENO_OPT_NATIVE_EVENT=y
CONFIG_XENO_OPT_NATIVE_MUTEX=y
CONFIG_XENO_OPT_NATIVE_COND=y
CONFIG_XENO_OPT_NATIVE_QUEUE=y
CONFIG_XENO_OPT_NATIVE_HEAP=y
CONFIG_XENO_OPT_NATIVE_ALARM=y
CONFIG_XENO_OPT_NATIVE_MPS=y
# CONFIG_XENO_OPT_NATIVE_INTR is not set
CONFIG_XENO_SKIN_POSIX=m
CONFIG_XENO_SKIN_PSOS=m
CONFIG_XENO_SKIN_UITRON=m
CONFIG_XENO_SKIN_VRTX=m
CONFIG_XENO_SKIN_VXWORKS=m
CONFIG_XENO_SKIN_RTAI=m
CONFIG_XENO_OPT_RTAI_FIFO=y
CONFIG_XENO_OPT_RTAI_SEM=y
CONFIG_XENO_OPT_RTAI_SHM=y
CONFIG_XENO_SKIN_RTDM=y
CONFIG_XENO_SKIN_UVM=m

#
# Drivers
#
# CONFIG_XENO_DRIVERS_16550A is not set
CONFIG_XENO_DRIVERS_TIMERBENCH=m
-----------
/usr/xenomai/bin $ ./xeno-test
running ./xeno-test

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 6
model name : AMD Athlon(tm) XP 1600+
stepping : 2
cpu MHz : 1400.291
cache size : 256 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 2804.44

Thu Apr 13 09:37:38 CEST 2006

running: cat /proc/meminfo
MemTotal:       774728 kB
MemFree:        744832 kB
Buffers:          3000 kB
Cached:          12284 kB
SwapCached:          0 kB
Active:          11200 kB
Inactive:         6328 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       774728 kB
LowFree:        744832 kB
SwapTotal:     1959920 kB
SwapFree:      1959920 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:           4804 kB
Slab:             8512 kB
CommitLimit:   2347284 kB
Committed_AS:     8200 kB
PageTables:        196 kB
VmallocTotal:   253924 kB
VmallocUsed:      2100 kB
VmallocChunk:   251804 kB

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/ipipe/Linux
Priority=100, Id=0x00000000
irq0-15: accepted
irq16-206: passed
irq207-208: accepted
irq209-212: passed
irq213-216: accepted
irq217-221: passed
irq222-223: accepted
irq224-225: grabbed, virtual
irq226: passed, virtual

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/ipipe/Xenomai
Priority=200, Id=0x58454e4f
irq0-215: passed
irq216: grabbed
irq217-223: passed
irq224-225: passed, virtual
irq226: grabbed, virtual

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/ipipe/version
1.2-01

Thu Apr 13 09:37:38 CEST 2006
running: generate_loads 1
dd workload started, pids 5785

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/interrupts
CPU0

  0:     169640          XT-PIC  timer, rthal_broadcast_timer
  1:          8          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  9:          0          XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
 11:       1956          XT-PIC  eth0
 12:        127          XT-PIC  i8042
 14:       1246          XT-PIC  ide0
 15:         16          XT-PIC  ide1
NMI:          0
LOC:     169605
ERR:          2

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/loadavg
0.16 0.03 0.01 2/33 5789
head: -13' option is obsolete; use -n 13' since this will be removed in the future

Thu Apr 13 09:37:38 CEST 2006
running: top -bn1c
top - 09:37:39 up 11 min, 1 user, load average: 0.16, 0.03, 0.01

Tasks:  35 total,   2 running,  33 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.8% us,  0.8% sy,  0.0% ni, 97.4% id,  1.1% wa,  0.0% hi,  0.0% si
Mem:    774728k total,    30400k used,   744328k free,     3008k buffers
Swap:  1959920k total,        0k used,  1959920k free,    12344k cached
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5785 root      25   0  1464  356  292 R 98.4  0.0   0:00.63 dd if /dev/zero 
of /dev/null
    1 root      16   0  1460  488  428 S  0.0  0.1   0:00.06 init [3]
    2 root      39  19     0    0    0 S  0.0  0.0   0:00.00 [ksoftirqd/0]

Thu Apr 13 09:37:39 CEST 2006
running: ./run -- -q -s -T 10 -t0
head: -1' option is obsolete; use -n 1' since this will be removed in the future
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5865 Killed $suflag $*
$cmdargs

Thu Apr 13 09:37:40 CEST 2006
running: ./run -- -q -s -T 10 -t1
head: -1' option is obsolete; use -n 1' since this will be removed in the future
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel periodic task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5944 Killed $suflag $*
$cmdargs

Thu Apr 13 09:37:41 CEST 2006
running: ./run -- -q -s -T 10 -t2
head: -1' option is obsolete; use -n 1' since this will be removed in the future
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel timer handler
== All results in microseconds
latency: failed to open benchmark device, code -16
(modprobe xeno_timerbench?)

Thu Apr 13 09:37:42 CEST 2006
running: cat /proc/interrupts
CPU0

  0:     170509          XT-PIC  timer, rthal_broadcast_timer
  1:          8          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  9:          0          XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
 11:       2055          XT-PIC  eth0
 12:        127          XT-PIC  i8042
 14:       1260          XT-PIC  ide0
 15:         16          XT-PIC  ide1
NMI:          0
LOC:     170474
ERR:          2

Thu Apr 13 09:37:42 CEST 2006
running: cat /proc/loadavg
0.16 0.03 0.01 4/33 6033
head: -13' option is obsolete; use -n 13' since this will be removed in the future

Thu Apr 13 09:37:42 CEST 2006
running: top -bn1c
top - 09:37:42 up 11 min, 1 user, load average: 0.16, 0.03, 0.01

Tasks:  35 total,   2 running,  33 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0% us,  1.1% sy,  0.0% ni, 96.9% id,  1.1% wa,  0.0% hi,  0.0% si
Mem:    774728k total,    30556k used,   744172k free,     3044k buffers
Swap:  1959920k total,        0k used,  1959920k free,    12344k cached
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5785 root      25   0  1464  356  292 R 98.9  0.0   0:03.70 dd if /dev/zero 
of /dev/null
    1 root      19   0  1460  488  428 S  0.0  0.1   0:00.06 init [3]
    2 root      39  19     0    0    0 S  0.0  0.0   0:00.00 [ksoftirqd/0]
#1 lore raw
Quoted 8 lines · Tobias Marschall

Hallo,

I've been using rtai until now and decided to give xenomai (release 2.1) a try. I followed the instructions from README.INSTALL, and everything (kernel patching, compilation, etc.) went fine. Then I tried to run the latency test, which failed:

-----------
/usr/xenomai/testsuite/latency $ ./run
head: -1' option is obsolete; use -n 1' since this will be removed in the

this particular error is patched, attached.

Quoted 12 lines

future
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5936 Killed $suflag $* $cmdargs
-----------

Quoted 3 lines

The same for "switch", the same if I call ./latency directly.

Is it correct that the xeno_timerbench module is required for the latency test?

I believe that it (timerbench) is only needed for latency -t2, ICBW. I built it as a module

Quoted 3 lines

I get the same result wheter or not I load the module.

Ive seen that Killed line before - but its been a while, I have no recollection...

have you tried 'run -- ' ?
the double dash insures that the following args are passed thru the script, (so its very unlikely to matter here, but you never know ..)

heres a chunk from xeno-test on my box.
Obviously it didnt work for you, but you can re-try the running line, see if its different than what youre currently getting.

Mon Apr 10 14:58:26 PDT 2006
running: ./run -- -T 120 -h -s -l 30 -t0
*
*
* Type ^C to stop this application.
*
*
== 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)
RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
RTD|      24.499|      40.854|      58.042|       0|      24.499|      58.042
RTD|      24.746|      40.783|      57.502|       0|      24.499|      58.042
RTD|      24.353|      40.768|      57.772|       0|      24.353|      58.042
Quoted 3 lines

What am I doing wrong?

dunno, but I hope this is helpful til you get better answers.

Quoted 34 lines

Thanks in advance and best regards,
Tobias

Some (hopefully useful) information follows:
-----------
/usr/xenomai/bin $ ./xeno-info
If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.

Linux tobi 2.6.14 #3 PREEMPT Thu Apr 13 09:13:53 CEST 2006 i686 AMD Athlon(tm) XP 1600+ AuthenticAMD GNU/Linux

Gnu C                  3.3.6
Gnu make               3.80
util-linux             2.12r
mount                  2.12r
module-init-tools      3.2.1
e2fsprogs              1.38
Linux C Library        2.3.5
head: `-1' option is obsolete; use `-n 1' since this will be removed in the future
Dynamic linker (ldd)   2.3.5
Procps                 3.2.5
Net-tools              1.60
Kbd                    1.12
Sh-utils               5.2.1
Modules Loaded         xeno_timerbench

-----------
~ $ dmesg|grep -i xenomai
I-pipe: Domain Xenomai registered.
Xenomai: hal/x86 started.
Xenomai: real-time nucleus v2.1 (Champagne) loaded.
Xenomai: starting native API services.
Xenomai: starting RTDM services.

Quoted 4 lines

-----------
/usr/src/linux $ grep -3i xeno .config
#

FWIW, if you enable
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
then the xeno-test script will run that grep (ie zgrep XENO /proc/config.gz) for you.

there are a few additions that might be worthwhile -

zegrep -E '^CONFIG_M|PREEMPT' pc-3/.config
CONFIG_MMU=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_M586MMX=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_MICROCODE=m
CONFIG_MII=y
CONFIG_MSDOS_FS=m
CONFIG_MSDOS_PARTITION=y
CONFIG_MAGIC_SYSRQ=y

I havent made them, the CONFIG_M picks up the Machine, but is perhaps too noisy. THen again, MMU an MODULE_* info is useful.

xeno-test.in +1 -1
Index: scripts/xeno-test.in
===================================================================
@@ -90,7 +90,7 @@
     loudly cat /proc/interrupts
     loudly cat /proc/loadavg
     [ -n "$prepost" ] && loudly $prepost
-    loudly top -bn1c | head -$(( 12 + $workload ))
+    loudly top -bn1c | head -n $(( 12 + $workload ))
 }
 
 
#2 lore raw
Quoted 4 lines · Jim Cromie
Quoted 2 lines · Tobias Marschall

Hallo,

Quoted 9 lines
Quoted 5 lines

I've been using rtai until now and decided to give xenomai (release 2.1) a try. I followed the instructions from README.INSTALL, and everything (kernel patching, compilation, etc.) went fine. Then I tried to run the latency test, which failed:

-----------
/usr/xenomai/testsuite/latency $ ./run
head: -1' option is obsolete; use -n 1' since this will be removed in the

this particular error is patched, attached.

Applied, Thanks.

Signature · 1 line
Philippe.
#3 lore raw
In reply to Jim Cromie
Quoted 4 lines · Jim Cromie
Quoted 2 lines · Tobias Marschall

Hallo,

Quoted 8 lines
Quoted 5 lines

I've been using rtai until now and decided to give xenomai (release 2.1) a try. I followed the instructions from README.INSTALL, and everything (kernel patching, compilation, etc.) went fine. Then I tried to run the latency test, which failed:

-----------
/usr/xenomai/testsuite/latency $ ./run
head: -1' option is obsolete; use -n 1' since this will be removed in the

this particular error is patched, attached.

While I was at it, I've fixed other spots in the same vein, in other scripts. This patch applies against v2.1.0.

Signature · 1 line
Philippe.
xeno-info +1 -1
Index: scripts/xeno-info
===================================================================
@@ -54,7 +54,7 @@
 -e 's/\.so$//' | awk -F'[.-]'   '{print "Linux C Library        " \
 $(NF-2)"."$(NF-1)"."$NF}'
 
-ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -1 | awk \
+ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n1 | awk \
 'NR==1{print "Dynamic linker (ldd)  ", $NF}'
 
 ls -l /usr/lib/lib{g,stdc}++.so  2>/dev/null | awk -F. \
prepare-kernel.sh +1 -1
Index: scripts/prepare-kernel.sh
===================================================================
@@ -321,7 +321,7 @@
    exit 2
 else
    if test x$adeos_patch = x; then
-      default_adeos_patch=`( ls $xenomai_root/ksrc/arch/$xenomai_arch/patches/adeos-ipipe-$linux_VERSION.$linux_PATCHLEVEL*|sort -r ) 2>/dev/null | head -1`
+      default_adeos_patch=`( ls $xenomai_root/ksrc/arch/$xenomai_arch/patches/adeos-ipipe-$linux_VERSION.$linux_PATCHLEVEL*|sort -r ) 2>/dev/null | head -n1`
    fi
    if test x$default_adeos_patch = x; then
       default_adeos_patch=/dev/null
xeno-load.in +1 -1
Index: scripts/xeno-load.in
===================================================================
@@ -56,7 +56,7 @@
 fi
 
 if test $target_name = default; then
-  target_name=`cut -s -d: -f1 $run_info_file | head -1`
+  target_name=`cut -s -d: -f1 $run_info_file | head -n1`
   if test "x$target_name" = x; then
      echo "xeno-load: no target defined in $run_info_file"
      exit 2
#4 lore raw
In reply to Tobias Marschall

I saw a similar error when using --enable-x86-sep and not having NPTL enabled in glibc.
Try configuring without --enable-x86-sep (used in the README.INSTALL Pentium x86 example, the default is disabled).

-Scott Biddlestone

Quoted 334 lines · Tobias Marschall

Hallo,

I've been using rtai until now and decided to give xenomai (release 2.1) a try. I followed the instructions from README.INSTALL, and everything (kernel patching, compilation, etc.) went fine. Then I tried to run the latency test, which failed:

-----------
/usr/xenomai/testsuite/latency $ ./run
head: -1' option is obsolete; use -n 1' since this will be removed in the future *
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5936 Killed $suflag $* $cmdargs
-----------

The same for "switch", the same if I call ./latency directly.

Is it correct that the xeno_timerbench module is required for the latency test? I get the same result wheter or not I load the module.

What am I doing wrong?

Thanks in advance and best regards,
Tobias

Some (hopefully useful) information follows:
-----------
/usr/xenomai/bin $ ./xeno-info
If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.

Linux tobi 2.6.14 #3 PREEMPT Thu Apr 13 09:13:53 CEST 2006 i686 AMD Athlon(tm) XP 1600+ AuthenticAMD GNU/Linux

Gnu C                  3.3.6
Gnu make               3.80
util-linux             2.12r
mount                  2.12r
module-init-tools      3.2.1
e2fsprogs              1.38
Linux C Library        2.3.5
head: `-1' option is obsolete; use `-n 1' since this will be removed in the future
Dynamic linker (ldd)   2.3.5
Procps                 3.2.5
Net-tools              1.60
Kbd                    1.12
Sh-utils               5.2.1
Modules Loaded         xeno_timerbench

-----------
~ $ dmesg|grep -i xenomai
I-pipe: Domain Xenomai registered.
Xenomai: hal/x86 started.
Xenomai: real-time nucleus v2.1 (Champagne) loaded.
Xenomai: starting native API services.
Xenomai: starting RTDM services.
-----------
/usr/src/linux $ grep -3i xeno .config
#
# Real-time sub-system
#
CONFIG_XENOMAI=y
CONFIG_XENO_OPT_NUCLEUS=y CONFIG_XENO_OPT_PERVASIVE=y CONFIG_XENO_OPT_PIPE=y CONFIG_XENO_OPT_PIPE_NRDEV=32 CONFIG_XENO_OPT_REGISTRY=y CONFIG_XENO_OPT_REGISTRY_NRSLOTS=512 CONFIG_XENO_OPT_SYS_HEAPSZ=128
# CONFIG_XENO_OPT_ISHIELD is not set CONFIG_XENO_OPT_STATS=y
# CONFIG_XENO_OPT_DEBUG is not set
# CONFIG_XENO_OPT_WATCHDOG is not set

#
# Timing
#
CONFIG_XENO_OPT_TIMING_PERIODIC=y
CONFIG_XENO_OPT_TIMING_PERIOD=0
CONFIG_XENO_OPT_TIMING_TIMERLAT=0
CONFIG_XENO_OPT_TIMING_SCHEDLAT=0

#
# Scalability
#
# CONFIG_XENO_OPT_SCALABLE_SCHED is not set
CONFIG_XENO_OPT_TIMER_LIST=y
# CONFIG_XENO_OPT_TIMER_HEAP is not set

#
# Shared interrupts
#
# CONFIG_XENO_OPT_SHIRQ_LEVEL is not set
# CONFIG_XENO_OPT_SHIRQ_EDGE is not set

#
# Machine
#
CONFIG_XENO_HW_FPU=y

#
# NMI watchdog
#
# CONFIG_XENO_HW_NMI_DEBUG_LATENCY is not set

#
# SMI workaround
#
# CONFIG_XENO_HW_SMI_DETECT_DISABLE is not set
CONFIG_XENO_HW_SMI_DETECT=y
# CONFIG_XENO_HW_SMI_WORKAROUND is not set

#
# Interfaces
#
CONFIG_XENO_SKIN_NATIVE=y
CONFIG_XENO_OPT_NATIVE_PIPE=y
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=4096
CONFIG_XENO_OPT_NATIVE_SEM=y
CONFIG_XENO_OPT_NATIVE_EVENT=y
CONFIG_XENO_OPT_NATIVE_MUTEX=y
CONFIG_XENO_OPT_NATIVE_COND=y
CONFIG_XENO_OPT_NATIVE_QUEUE=y
CONFIG_XENO_OPT_NATIVE_HEAP=y
CONFIG_XENO_OPT_NATIVE_ALARM=y
CONFIG_XENO_OPT_NATIVE_MPS=y
# CONFIG_XENO_OPT_NATIVE_INTR is not set
CONFIG_XENO_SKIN_POSIX=m
CONFIG_XENO_SKIN_PSOS=m
CONFIG_XENO_SKIN_UITRON=m
CONFIG_XENO_SKIN_VRTX=m
CONFIG_XENO_SKIN_VXWORKS=m
CONFIG_XENO_SKIN_RTAI=m
CONFIG_XENO_OPT_RTAI_FIFO=y
CONFIG_XENO_OPT_RTAI_SEM=y
CONFIG_XENO_OPT_RTAI_SHM=y
CONFIG_XENO_SKIN_RTDM=y
CONFIG_XENO_SKIN_UVM=m

#
# Drivers
#
# CONFIG_XENO_DRIVERS_16550A is not set
CONFIG_XENO_DRIVERS_TIMERBENCH=m
-----------
/usr/xenomai/bin $ ./xeno-test
running ./xeno-test

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 6
model name : AMD Athlon(tm) XP 1600+
stepping : 2
cpu MHz : 1400.291
cache size : 256 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 2804.44

Thu Apr 13 09:37:38 CEST 2006

running: cat /proc/meminfo
MemTotal:       774728 kB
MemFree:        744832 kB
Buffers:          3000 kB
Cached:          12284 kB
SwapCached:          0 kB
Active:          11200 kB
Inactive:         6328 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       774728 kB
LowFree:        744832 kB
SwapTotal:     1959920 kB
SwapFree:      1959920 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:           4804 kB
Slab:             8512 kB
CommitLimit:   2347284 kB
Committed_AS:     8200 kB
PageTables:        196 kB
VmallocTotal:   253924 kB
VmallocUsed:      2100 kB
VmallocChunk:   251804 kB

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/ipipe/Linux
Priority=100, Id=0x00000000
irq0-15: accepted
irq16-206: passed
irq207-208: accepted
irq209-212: passed
irq213-216: accepted
irq217-221: passed
irq222-223: accepted
irq224-225: grabbed, virtual
irq226: passed, virtual

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/ipipe/Xenomai
Priority=200, Id=0x58454e4f
irq0-215: passed
irq216: grabbed
irq217-223: passed
irq224-225: passed, virtual
irq226: grabbed, virtual

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/ipipe/version
1.2-01

Thu Apr 13 09:37:38 CEST 2006
running: generate_loads 1
dd workload started, pids 5785

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/interrupts
CPU0

 0:     169640          XT-PIC  timer, rthal_broadcast_timer
 1:          8          XT-PIC  i8042
 2:          0          XT-PIC  cascade
 9:          0          XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
11:       1956          XT-PIC  eth0
12:        127          XT-PIC  i8042
14:       1246          XT-PIC  ide0
15:         16          XT-PIC  ide1
NMI:          0
LOC:     169605
ERR:          2

Thu Apr 13 09:37:38 CEST 2006
running: cat /proc/loadavg
0.16 0.03 0.01 2/33 5789
head: -13' option is obsolete; use -n 13' since this will be removed in the future

Thu Apr 13 09:37:38 CEST 2006
running: top -bn1c
top - 09:37:39 up 11 min, 1 user, load average: 0.16, 0.03, 0.01

Tasks:  35 total,   2 running,  33 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.8% us,  0.8% sy,  0.0% ni, 97.4% id,  1.1% wa,  0.0% hi,  0.0% si
Mem:    774728k total,    30400k used,   744328k free,     3008k buffers
Swap:  1959920k total,        0k used,  1959920k free,    12344k cached
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
5785 root      25   0  1464  356  292 R 98.4  0.0   0:00.63 dd if /dev/zero of /dev/null
   1 root      16   0  1460  488  428 S  0.0  0.1   0:00.06 init [3]
   2 root      39  19     0    0    0 S  0.0  0.0   0:00.00 [ksoftirqd/0]

Thu Apr 13 09:37:39 CEST 2006
running: ./run -- -q -s -T 10 -t0
head: -1' option is obsolete; use -n 1' since this will be removed in the future *
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5865 Killed $suflag $* $cmdargs

Thu Apr 13 09:37:40 CEST 2006
running: ./run -- -q -s -T 10 -t1
head: -1' option is obsolete; use -n 1' since this will be removed in the future *
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel periodic task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5944 Killed $suflag $* $cmdargs

Thu Apr 13 09:37:41 CEST 2006
running: ./run -- -q -s -T 10 -t2
head: -1' option is obsolete; use -n 1' since this will be removed in the future *
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: in-kernel timer handler
== All results in microseconds
latency: failed to open benchmark device, code -16
(modprobe xeno_timerbench?)

Thu Apr 13 09:37:42 CEST 2006
running: cat /proc/interrupts
CPU0

 0:     170509          XT-PIC  timer, rthal_broadcast_timer
 1:          8          XT-PIC  i8042
 2:          0          XT-PIC  cascade
 9:          0          XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
11:       2055          XT-PIC  eth0
12:        127          XT-PIC  i8042
14:       1260          XT-PIC  ide0
15:         16          XT-PIC  ide1
NMI:          0
LOC:     170474
ERR:          2

Thu Apr 13 09:37:42 CEST 2006
running: cat /proc/loadavg
0.16 0.03 0.01 4/33 6033
head: -13' option is obsolete; use -n 13' since this will be removed in the future

Thu Apr 13 09:37:42 CEST 2006
running: top -bn1c
top - 09:37:42 up 11 min, 1 user, load average: 0.16, 0.03, 0.01

Tasks:  35 total,   2 running,  33 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0% us,  1.1% sy,  0.0% ni, 96.9% id,  1.1% wa,  0.0% hi,  0.0% si
Mem:    774728k total,    30556k used,   744172k free,     3044k buffers
Swap:  1959920k total,        0k used,  1959920k free,    12344k cached
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
5785 root      25   0  1464  356  292 R 98.9  0.0   0:03.70 dd if /dev/zero of /dev/null
   1 root      19   0  1460  488  428 S  0.0  0.1   0:00.06 init [3]
   2 root      39  19     0    0    0 S  0.0  0.0   0:00.00 [ksoftirqd/0]

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

#5 lore raw

Hello,

Quoted 4 lines · you

I saw a similar error when using --enable-x86-sep and not having NPTL enabled in glibc.
Try configuring without --enable-x86-sep (used in the README.INSTALL Pentium x86 example, the default is disabled).

that did the trick, thank you for the hint! I did check that the cpu supported the sep instruction, but I wasn't aware that NPTL is required in this case.

Mentioning this in README.INSTALL would be helpful. I wonder if that mistake could be caught by configure.

Regards,
Tobias

Quoted 23 lines
Quoted 22 lines · Tobias Marschall

Hallo,

I've been using rtai until now and decided to give xenomai (release 2.1) a try. I followed the instructions from README.INSTALL, and everything (kernel patching, compilation, etc.) went fine. Then I tried to run the latency test, which failed:

-----------
/usr/xenomai/testsuite/latency $ ./run
head: -1' option is obsolete; use -n 1' since this will be removed in the future
*
*
* Type ^C to stop this application.
*
*
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
/usr/xenomai/bin/xeno-load: line 178: 5936 Killed
$suflag $* $cmdargs
-----------

#6 lore raw
Quoted 7 lines · Tobias Marschall

Hello,

Quoted 4 lines · you

I saw a similar error when using --enable-x86-sep and not having NPTL enabled in glibc.
Try configuring without --enable-x86-sep (used in the README.INSTALL Pentium x86 example, the default is disabled).

Quoted 5 lines

that did the trick, thank you for the hint! I did check that the cpu supported the sep instruction, but I wasn't aware that NPTL is required in this case.

Mentioning this in README.INSTALL would be helpful. I wonder if that mistake could be caught by configure.

It could be caught by configure, at least if not cross-compiling, by running getconf GNU_LIBPTHREAD_VERSION.

Signature · 1 line
					    Gilles Chanteperdrix.
#7 lore raw
Quoted 8 lines · Gilles Chanteperdrix
Quoted 7 lines · Tobias Marschall

Hello,

Quoted 4 lines · you

I saw a similar error when using --enable-x86-sep and not having NPTL enabled in glibc.
Try configuring without --enable-x86-sep (used in the README.INSTALL Pentium x86 example, the default is disabled).

Quoted 10 lines
Quoted 5 lines

that did the trick, thank you for the hint! I did check that the cpu supported the sep instruction, but I wasn't aware that NPTL is required in this case.

Mentioning this in README.INSTALL would be helpful. I wonder if that mistake could be caught by configure.

It could be caught by configure, at least if not cross-compiling, by running getconf GNU_LIBPTHREAD_VERSION.

ie:
[[email protected] xenomai]$ getconf GNU_LIBPTHREAD_VERSION NPTL 2.3.6

doesnt /proc/cpuinfo, flags entry, indicate whether the cpu supports SEP ?

flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2

what x86 processors support --enable-x86-sep ? Pentium-4 ? Xeon ? Athlon ?
my Pentium-M apparently doesnt.

WRT inferring more stuff from the build/host machine, I have some concerns;
I build on my 686 laptop for a smaller/different 586 target. This is not 'cross-compilation', and could be compromised by too many automatic optimizations.
So, ideally, Id like the potentially troublesome optimizations to be
identified and gated by a prompt.

Maybe we need a script thats run on the target box, that collects the needed configuration factors; presumably including:
CPUFLAGS=grep flags /proc/cpuinfo
NPTL_AVAIL=getconf GNU_LIBPTHREAD_VERSION

Somewhat related: prepare-kernel asks me for target architecture, I started by entering i586 explicitly, but after a while, just took the i686 default. Ive not noticed anything different/wrong, but would appreciate confirmation/explanation.

thanks
jimc

PS. attached is an attempt to improve README.INSTALL along these and other lines. Please feel free to cut out the false parts ;-)

README.INSTALL +16 -1
Index: README.INSTALL
===================================================================
@@ -74,6 +74,19 @@
 Once the target kernel has been prepared, all Xenomai configuration
 options are available from the "Real-time subsystem" toplevel menu.
 
+When configuring, you should *disable* PM (power management), ACPI,
+and CPU_FREQ.  The 1st 2 invoke uninterruptible BIOS routines, which
+destroy the rt-determinism guarantees that you're presumably seeking.
+If you're curious, build it, install it, and run xeno-test, you'll
+likely see very large latencies.  If you see otherwise, please email
+the evidence.
+
+CPU_FREQ is bad because it breaks some timing guarantees on some
+chips, and these problems are too varied/unpredictable to accomodate.
+For example, (my) Pentium-M laptop shows "cpu MHz : 600.000" at idle,
+but 1700 when compiling.  Some TSCs also change frequency with the
+processor, making them useless if the clock is changing.
+
 Once configured, the kernel should be built as usual.
 
 It might be a good idea to put all the output into a different build
@@ -143,9 +156,11 @@
 NAME                DESCRIPTION                      [BINDING,]DEFAULT(*)
 
 --enable-x86-sep    Enable x86 SEP instructions      strong,disabled
-                    for issuing syscalls
+                    for issuing syscalls.
+		    You will also need NPTL
 
 --enable-x86-tsc    Enable x86 TSC for timings       strong,enabled
+		    falls back to PIT if needed
 
 --enable-arm-arch   Define version of the target     strong,"4"
                     ARM core architecture
#8 lore raw
Quoted 19 lines · Jim Cromie
Quoted 8 lines · Gilles Chanteperdrix
Quoted 3 lines · Tobias Marschall

Hello,

Quoted 2 lines · you

I saw a similar error when using --enable-x86-sep and not having

NPTL

Quoted 3 lines
Quoted 3 lines

enabled in glibc.
Try configuring without --enable-x86-sep (used in the README.INSTALL Pentium x86 example, the default is disabled).

Quoted 8 lines
Quoted 1 line

that did the trick, thank you for the hint! I did check that the

cpu supported > the sep instruction, but I wasn't aware that NPTL is required in this case.

Quoted 1 line
Quoted 1 line

Mentioning this in README.INSTALL would be helpful. I wonder if

that mistake > could be caught by configure.
It could be caught by configure, at least if not cross-compiling, by running getconf GNU_LIBPTHREAD_VERSION.

Quoted 6 lines

ie:
[[email protected] xenomai]$ getconf GNU_LIBPTHREAD_VERSION NPTL 2.3.6

doesnt /proc/cpuinfo, flags entry, indicate whether the cpu supports SEP ?

It should, yes.

Quoted 2 lines

flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2

Strange indeed, if that's a recent genuine Intel CPU.

Quoted 3 lines

what x86 processors support --enable-x86-sep ? Pentium-4 ? Xeon ? Athlon ?
my Pentium-M apparently doesnt.

AFAIK, Intel supports sysenter/sysexit since the PII, and AMD introduced them with the K7. The genuine Pentium M does support them, no doubt.

Quoted 9 lines

WRT inferring more stuff from the build/host machine, I have some concerns;
I build on my 686 laptop for a smaller/different 586 target. This is not 'cross-compilation', and could be compromised by too many automatic optimizations.
So, ideally, Id like the potentially troublesome optimizations to be
identified and gated by a prompt.

Quoted 5 lines

Maybe we need a script thats run on the target box, that collects the needed configuration factors; presumably including:
CPUFLAGS=grep flags /proc/cpuinfo
NPTL_AVAIL=getconf GNU_LIBPTHREAD_VERSION

The problem is that we might not always have the target at hand when building the user-space support (e.g. LiveCD, deployment distro stuff). Therefore it could only be some optional helper, but not part of the regular build process.

Quoted 5 lines

Somewhat related: prepare-kernel asks me for target architecture, I started by entering i586 explicitly, but after a while, just took the i686 default. Ive not noticed anything different/wrong, but would appreciate confirmation/explanation.

Which information did you look at to determine that it was using the 686 profile?

Quoted 55 lines

thanks
jimc

PS. attached is an attempt to improve README.INSTALL along these and other lines. Please feel free to cut out the false parts ;-)

------------------------------------------------------------------------

Index: README.INSTALL
===================================================================

README.INSTALL +16 -2
@@ -74,6 +74,19 @@
 Once the target kernel has been prepared, all Xenomai configuration
 options are available from the "Real-time subsystem" toplevel menu.
 
+When configuring, you should *disable* PM (power management), ACPI,
+and CPU_FREQ.  The 1st 2 invoke uninterruptible BIOS routines, which
+destroy the rt-determinism guarantees that you're presumably seeking.
+If you're curious, build it, install it, and run xeno-test, you'll
+likely see very large latencies.  If you see otherwise, please email
+the evidence.
+
+CPU_FREQ is bad because it breaks some timing guarantees on some
+chips, and these problems are too varied/unpredictable to accomodate.
+For example, (my) Pentium-M laptop shows "cpu MHz : 600.000" at idle,
+but 1700 when compiling.  Some TSCs also change frequency with the
+processor, making them useless if the clock is changing.
+
 Once configured, the kernel should be built as usual.
 
 It might be a good idea to put all the output into a different build
@@ -143,9 +156,11 @@
 NAME                DESCRIPTION                      [BINDING,]DEFAULT(*)
 
 --enable-x86-sep    Enable x86 SEP instructions      strong,disabled
-                    for issuing syscalls
+                    for issuing syscalls.
+		    You will also need NPTL
 
 --enable-x86-tsc    Enable x86 TSC for timings       strong,enabled
+		    falls back to PIT if needed
 
 --enable-arm-arch   Define version of the target     strong,"4"
                     ARM core architecture
 
 
------------------------------------------------------------------------

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.
#9 lore raw
Quoted 10 lines · Philippe Gerum
Quoted 5 lines

Maybe we need a script thats run on the target box, that collects the needed configuration factors; presumably including:
CPUFLAGS=grep flags /proc/cpuinfo
NPTL_AVAIL=getconf GNU_LIBPTHREAD_VERSION

The problem is that we might not always have the target at hand when building the user-space support (e.g. LiveCD, deployment distro stuff). Therefore it could only be some optional helper, but not part of the regular build process.

Maybe we could modify skins user-space initialization so that they test whether running NPTL if SEP is enabled ? Here is an example, doing this in plain C :

https://listman.redhat.com/archives/phil-list/2003-April/msg00036.html

Signature · 1 line
					    Gilles Chanteperdrix.
#10 lore raw
Quoted 12 lines · Gilles Chanteperdrix
Quoted 10 lines · Philippe Gerum
Quoted 5 lines

Maybe we need a script thats run on the target box, that collects the needed configuration factors; presumably including:
CPUFLAGS=grep flags /proc/cpuinfo
NPTL_AVAIL=getconf GNU_LIBPTHREAD_VERSION

The problem is that we might not always have the target at hand when building the user-space support (e.g. LiveCD, deployment distro stuff). Therefore it could only be some optional helper, but not part of the regular build process.

Quoted 6 lines

Maybe we could modify skins user-space initialization so that they test whether running NPTL if SEP is enabled ? Here is an example, doing this in plain C :

https://listman.redhat.com/archives/phil-list/2003-April/msg00036.html

Looks good. Additionally, we might end up moving common portions of the various library constructors into a single file in order to reduce code duplication.

Signature · 1 line
Philippe.
#11 lore raw
Quoted 3 lines · Philippe Gerum

Looks good. Additionally, we might end up moving common portions of the various library constructors into a single file in order to reduce code duplication.

The attached patch tries to do that. The single file is named include/nucleus/skin_init.h.

Signature · 1 line
					    Gilles Chanteperdrix.
asm-generic/syscall.h +1 -1
Index: include/asm-generic/syscall.h
===================================================================
@@ -112,7 +112,7 @@
 #include <sys/types.h>
 #include <asm/xenomai/features.h>
 
-#endif /* __KERNEL__ */
+#endif /* !__KERNEL__ */
 
 typedef struct xncompletion {
 
asm-i386/features.h +31 -0
Index: include/asm-i386/features.h
===================================================================
@@ -76,4 +76,35 @@
     }
 }
 
+#ifndef __KERNEL__
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static inline void xeno_x86_features_check(void)
+{
+#ifdef CONFIG_XENO_X86_SEP
+  size_t n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0);
+  if (n > 0)
+      {
+      char *buf = malloc(n);
+      int isnptl;
+      
+      confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, n);
+      isnptl = strstr (buf, "NPTL");
+      free(buf);
+
+      if (isnptl)
+          return;
+      }
+
+  fprintf(stderr, "Xenomai: SEP instruction needs NPTL and NPTL was not detected"
+          "\nplease install NPTL or recompile Xenomai without enabling SEP.\n");
+  exit(1);
+#endif /* CONFIG_XENO_X86_SEP */
+}
+#define xeno_arch_features_check() xeno_x86_features_check()
+#endif /* __KERNEL__ */
+
 #endif /* !_XENO_ASM_I386_FEATURES_H */
nucleus/Makefile.am +2 -0
Index: include/nucleus/Makefile.am
===================================================================
@@ -22,3 +22,5 @@
 	types.h \
 	version.h \
 	xenomai.h
+
+EXTRA_DIST = skin_init.h
skins/rtai/init.c +2 -41

53 lines not on this page · raw message

skins/posix/init.c +3 -55

80 lines not on this page · raw message

skins/vxworks/init.c +12 -66

94 lines not on this page · raw message

skins/vrtx/init.c +18 -69

107 lines not on this page · raw message

skins/native/init.c +9 -65

91 lines not on this page · raw message

skins/rtdm/init.c +4 -0
Index: src/skins/rtdm/init.c
===================================================================
@@ -30,6 +30,10 @@
     xnfeatinfo_t finfo;
     int muxid;
 
+#ifdef xeno_arch_features_check
+    xeno_arch_features_check();
+#endif /* xeno_arch_features_check */
+
     muxid = XENOMAI_SYSBIND(RTDM_SKIN_MAGIC,
 			    XENOMAI_FEAT_DEP,
 			    XENOMAI_ABI_REV,
skins/uvm/init.c +3 -38

52 lines not on this page · raw message

nucleus/skin_init.h new file +73 -0

73 lines not on this page · raw message

#12 lore raw
In reply to Philippe Gerum
Quoted 28 lines · Philippe Gerum
Quoted 20 lines · Jim Cromie
Quoted 7 lines · Gilles Chanteperdrix
Quoted 3 lines · Tobias Marschall

Hello,

Quoted 2 lines · you

I saw a similar error when using --enable-x86-sep and not

having NPTL

Quoted 2 lines
Quoted 2 lines

enabled in glibc.
Try configuring without --enable-x86-sep (used in the

Quoted 10 lines

README.INSTALL

Quoted 2 lines
Quoted 1 line

Pentium x86 example, the default is disabled).

that did the trick, thank you for the hint! I did check that the

cpu supported > the sep instruction, but I wasn't aware that NPTL is required in this case.

Quoted 1 line
Quoted 1 line

Mentioning this in README.INSTALL would be helpful. I wonder

if that mistake > could be caught by configure.
It could be caught by configure, at least if not cross-compiling, by running getconf GNU_LIBPTHREAD_VERSION.

Quoted 6 lines

ie:
[[email protected] xenomai]$ getconf GNU_LIBPTHREAD_VERSION NPTL 2.3.6

doesnt /proc/cpuinfo, flags entry, indicate whether the cpu supports SEP ?

Quoted 7 lines

It should, yes.

Quoted 2 lines

flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2

Strange indeed, if that's a recent genuine Intel CPU.

Well, Im not *stoned*, but it clearly looks like I am.. heres the whole thing:

[[email protected] linux-2.6.16]$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.70GHz
stepping : 6
cpu MHz : 600.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2
bogomips : 1198.01

very strange. Ive seen someone elses P-4 cpuinfo, flag is there, spelled 'sep'

Quoted 6 lines
Quoted 3 lines

what x86 processors support --enable-x86-sep ? Pentium-4 ? Xeon ? Athlon ?
my Pentium-M apparently doesnt.

AFAIK, Intel supports sysenter/sysexit since the PII, and AMD introduced them with the K7. The genuine Pentium M does support them, no doubt.

Perhaps I need to email LKML.
What would you expect if I built with --enable-sep (for my laptop) ? success / illegal-instruction exception / undefined-wierd behavior ?

Quoted 9 lines
Quoted 9 lines

WRT inferring more stuff from the build/host machine, I have some concerns;
I build on my 686 laptop for a smaller/different 586 target. This is not 'cross-compilation', and could be compromised by too many automatic optimizations.
So, ideally, Id like the potentially troublesome optimizations to be
identified and gated by a prompt.

Quoted 8 lines
Quoted 5 lines

Maybe we need a script thats run on the target box, that collects the needed configuration factors; presumably including:
CPUFLAGS=grep flags /proc/cpuinfo
NPTL_AVAIL=getconf GNU_LIBPTHREAD_VERSION

The problem is that we might not always have the target at hand when building the user-space support (e.g. LiveCD, deployment distro stuff). Therefore it could only be some optional helper, but not part of the regular build process.

Ack. I was thinking in terms of a script run on target, which produces an .rc file, which defines the factor=value pairs needed.
that file, if supplied to prepare-kernel as --target-info=<foo>
would supply the customizations.
Yes, somewhat cumbersome..

Perhaps Ive just been lucky, 'cross-compiling' for 586 on 686. Ill try hacking prepare-kernel and re-building.

Quoted 7 lines
Quoted 5 lines

Somewhat related: prepare-kernel asks me for target architecture, I started by entering i586 explicitly, but after a while, just took the i686 default. Ive not noticed anything different/wrong, but would appreciate confirmation/explanation.

Which information did you look at to determine that it was using the 686 profile?

The script output told me. In response to my post, Gilles sent me the snippet from scripts/prepare-kernel where all x86) select i386.

Im not sure what youre asking, so I'll answer something (hopefully) close:
config/config.guess is providing the basis for the answer

if test x$linux_arch = x; then
build_arch=$xenomai_root/config/config.guess default_linux_arch=echo $build_arch|cut -f1 -d-
fi

which 'returns' this:

       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 

&& exit 0

ie
sh -vx config/config.guess
...
+ eval LIBC=gnu
LIBC=gnu
++ LIBC=gnu
+ test xgnu '!=' x
+ echo i686-pc-linux-gnu
i686-pc-linux-gnu

Quoted 6 lines
Quoted 6 lines

thanks
jimc

PS. attached is an attempt to improve README.INSTALL along these and other lines.

will redo per your comments

#13 lore raw
Quoted 64 lines · Jim Cromie
Quoted 30 lines · Philippe Gerum
Quoted 21 lines · Jim Cromie
Quoted 7 lines · Gilles Chanteperdrix
Quoted 3 lines · Tobias Marschall

Hello,

Quoted 2 lines · you

I saw a similar error when using --enable-x86-sep and not

having NPTL

Quoted 2 lines
Quoted 2 lines

enabled in glibc.
Try configuring without --enable-x86-sep (used in the

Quoted 10 lines

README.INSTALL

Quoted 2 lines
Quoted 1 line

Pentium x86 example, the default is disabled).

that did the trick, thank you for the hint! I did check that the

cpu supported > the sep instruction, but I wasn't aware that NPTL is required in this case.

Quoted 1 line
Quoted 1 line

Mentioning this in README.INSTALL would be helpful. I wonder

if that mistake > could be caught by configure.
It could be caught by configure, at least if not cross-compiling, by running getconf GNU_LIBPTHREAD_VERSION.

Quoted 6 lines

ie:
[[email protected] xenomai]$ getconf GNU_LIBPTHREAD_VERSION NPTL 2.3.6

doesnt /proc/cpuinfo, flags entry, indicate whether the cpu supports SEP ?

Quoted 7 lines

It should, yes.

Quoted 2 lines

flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2

Strange indeed, if that's a recent genuine Intel CPU.

Well, Im not *stoned*, but it clearly looks like I am.. heres the whole thing:

[[email protected] linux-2.6.16]$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.70GHz
stepping : 6
cpu MHz : 600.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2
bogomips : 1198.01

Quoted 2 lines

very strange. Ive seen someone elses P-4 cpuinfo, flag is there, spelled 'sep'

Same here.

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

what x86 processors support --enable-x86-sep ? Pentium-4 ? Xeon ? Athlon ?
my Pentium-M apparently doesnt.

Quoted 6 lines
Quoted 2 lines

AFAIK, Intel supports sysenter/sysexit since the PII, and AMD introduced them with the K7. The genuine Pentium M does support them, no doubt.

Perhaps I need to email LKML.
What would you expect if I built with --enable-sep (for my laptop) ? success / illegal-instruction exception / undefined-wierd behavior ?

Success or illegal instruction, I guess.

<snip>

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Maybe we need a script thats run on the target box, that collects the needed configuration factors; presumably including:
CPUFLAGS=grep flags /proc/cpuinfo
NPTL_AVAIL=getconf GNU_LIBPTHREAD_VERSION

Quoted 8 lines
Quoted 2 lines

The problem is that we might not always have the target at hand when building the user-space support (e.g. LiveCD, deployment distro stuff). Therefore it could only be some optional helper, but not part of the regular build process.

Ack. I was thinking in terms of a script run on target, which produces an .rc file, which defines the factor=value pairs needed.
that file, if supplied to prepare-kernel as --target-info=<foo>
would supply the customizations.
Yes, somewhat cumbersome..

Yep; Gilles's approach looking for potential configuration mismatch dynamically when running the target code seems easier to implement, and would provide a better coverage (e.g. building Xenomai for a 'generic' target).

Quoted 26 lines

Perhaps Ive just been lucky, 'cross-compiling' for 586 on 686. Ill try hacking prepare-kernel and re-building.

Quoted 7 lines
Quoted 5 lines

Somewhat related: prepare-kernel asks me for target architecture, I started by entering i586 explicitly, but after a while, just took the i686 default. Ive not noticed anything different/wrong, but would appreciate confirmation/explanation.

Which information did you look at to determine that it was using the 686 profile?

The script output told me. In response to my post, Gilles sent me the snippet from scripts/prepare-kernel where all x86) select i386.

Im not sure what youre asking, so I'll answer something (hopefully) close:
config/config.guess is providing the basis for the answer

if test x$linux_arch = x; then
build_arch=$xenomai_root/config/config.guess default_linux_arch=echo $build_arch|cut -f1 -d-
fi

which 'returns' this:

       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 

&& exit 0

Quoted 10 lines

ie
sh -vx config/config.guess
...
+ eval LIBC=gnu
LIBC=gnu
++ LIBC=gnu
+ test xgnu '!=' x
+ echo i686-pc-linux-gnu
i686-pc-linux-gnu

Ok, that is intended, but only if --arch is unspecified on the command line. Passing --arch=i586 should select i386 as the kernel architecture, which in turn causes the exact CPU profile to be obtained from Kconfig's current 'processor type and features' selection. The latter is what actually defines the arch-dependent compiler flags for the kernel (i.e. arch/i386/Makefile.cpu).

Quoted 10 lines
Quoted 7 lines
Quoted 7 lines

thanks
jimc

PS. attached is an attempt to improve README.INSTALL along these and other lines.

will redo per your comments

Signature · 1 line
Philippe.
#14 lore raw
In reply to Jim Cromie
Quoted 3 lines · Jim Cromie

PS. attached is an attempt to improve README.INSTALL along these and other lines. Please feel free to cut out the false parts ;-)

I think we should simply add a link from README.INSTALL to the troubleshooting guide, where things are explained in length, for each platforms.

Quoted 28 lines

------------------------------------------------------------------------

Index: README.INSTALL
===================================================================

README.INSTALL +13 -0
@@ -74,6 +74,19 @@
 Once the target kernel has been prepared, all Xenomai configuration
 options are available from the "Real-time subsystem" toplevel menu.
 
+When configuring, you should *disable* PM (power management), ACPI,
+and CPU_FREQ.  The 1st 2 invoke uninterruptible BIOS routines, which
+destroy the rt-determinism guarantees that you're presumably seeking.
+If you're curious, build it, install it, and run xeno-test, you'll
+likely see very large latencies.  If you see otherwise, please email
+the evidence.
+
+CPU_FREQ is bad because it breaks some timing guarantees on some
+chips, and these problems are too varied/unpredictable to accomodate.
+For example, (my) Pentium-M laptop shows "cpu MHz : 600.000" at idle,
+but 1700 when compiling.  Some TSCs also change frequency with the
+processor, making them useless if the clock is changing.
+
 Once configured, the kernel should be built as usual.
 
 It might be a good idea to put all the output into a different build

README.INSTALL line 164

Quoted 10 lines
README.INSTALL +3 -1
@@ -143,9 +156,11 @@
 NAME                DESCRIPTION                      [BINDING,]DEFAULT(*)
 
 --enable-x86-sep    Enable x86 SEP instructions      strong,disabled
-                    for issuing syscalls
+                    for issuing syscalls.
+		    You will also need NPTL
 
 --enable-x86-tsc    Enable x86 TSC for timings       strong,enabled
+		    falls back to PIT if needed
 

Nope, the user-space support could not fallback properly to PIT if TSC is activated using this switch. In the latter case, "rdtsc" insns will be wired into the code, making it invalid for using with CPUs lacking a timestamp counter.

Signature · 1 line
Philippe.