All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] High latencies on ARM
@ 2012-02-16  9:38 Alex Nikitenko
  2012-02-16 10:00 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Nikitenko @ 2012-02-16  9:38 UTC (permalink / raw)
  To: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 7533 bytes --]

Hi all,

I continue my struggling with xenomai on Tiny6410 board. Kernel version -
2.6.36. Xenomai version is 2.6.0. The problem is actually in very high
latencies (see log at the end).
In kernel config I disabled all the stuff I'm not planing to use at the
moment (touchscreen, video, audio, usb, networking).  I also disabled
CONFIG_SYS_SUPPORTS_APM_EMULATION.

Xenomai related configs attached. Just in case I made some mistakes in
configuring it.

Please, help me with the ideas what it could be.

Thanks,
Alex


[root@domain.hid /]# cd usr/xenomai/bin/
[root@domain.hid bin]# ./latency -t 0
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat
worst
RTD|    186.226|   3441.303|   6762.877|       0|     0|    186.226|
6762.877
RTD|    215.098|   3481.814|   6715.779|       0|     0|    186.226|
6762.877
RTD|    240.361|   3451.228|   6654.245|       0|     0|    186.226|
6762.877
RTD|    265.624|   3456.281|   6679.508|       0|     0|    186.226|
6762.877
RTD|    294.497|   3467.108|   6621.583|       0|     0|    186.226|
6762.877
RTD|    319.760|   3460.251|   6632.410|       0|     0|    186.226|
6762.877
RTD|    345.023|   3453.393|   6585.313|       0|     0|    186.226|
6762.877
RTD|    373.895|   3470.175|   6592.531|       0|     0|    186.226|
6762.877
RTD|    399.159|   3463.408|   6545.433|       0|     0|    186.226|
6762.877
RTD|    424.422|   3456.551|   6491.117|       0|     0|    186.226|
6762.877
RTD|    453.294|   3455.559|   6498.335|       0|     0|    186.226|
6762.877
RTD|    478.557|   3454.657|   6454.846|       0|     0|    186.226|
6762.877
RTD|    503.821|   3459.619|   6462.064|       0|     0|    186.226|
6762.877
RTD|    505.535|   3458.626|   6414.966|       0|     0|    186.226|
6762.877
RTD|    516.362|   3457.724|   6405.853|       0|     0|    186.226|
6762.877
RTD|    458.437|   3456.732|   6434.726|       0|     0|    186.226|
6762.877
RTD|    414.948|   3455.829|   6459.989|       0|     0|    186.226|
6762.877
RTD|    422.166|   3454.927|   6488.861|       0|     0|    186.226|
6762.877
RTD|    371.459|   3465.754|   6514.124|       0|     0|    186.226|
6762.877
RTD|    320.752|   3447.078|   6539.388|       0|     0|    186.226|
6762.877
RTD|    327.970|   3452.040|   6568.260|       0|     0|    186.226|
6762.877
RTT|  00:00:22  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat
worst
RTD|    277.263|   3468.912|   6593.523|       0|     0|    186.226|
6762.877
RTD|    291.700|   3438.326|   6618.786|       0|     0|    186.226|
6762.877
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|    186.226|   3457.634|   6762.877|       0|     0|
00:00:23/00:00:23
[root@domain.hid bin]# ./latency -t 1
== Sampling period: 1000 us
== Test mode: in-kernel periodic task
== All results in microseconds
warming up...
RTT|  00:00:01  (in-kernel periodic task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat
worst
RTD|      1.480|    501.766|   1015.357|      12|     0|      1.480|
1015.357
RTD|      0.451|    501.820|   1013.913|      24|     0|      0.451|
1015.357
RTD|      1.083|    500.804|   1016.529|      35|     0|      0.451|
1016.529
RTD|      1.119|    498.760|   1017.522|      40|     0|      0.451|
1017.522
RTD|      1.714|    501.697|   1023.928|      52|     0|      0.451|
1023.928
RTD|      0.451|    500.682|   1019.056|      63|     0|      0.451|
1023.928
RTD|      1.209|    500.773|   1014.003|      73|     0|      0.451|
1023.928
RTD|      1.389|    498.794|   1016.620|      79|     0|      0.451|
1023.928
RTD|      2.165|    500.795|   1021.672|      89|     0|      0.451|
1023.928
RTD|      1.804|    502.780|   1021.943|     103|     0|      0.451|
1023.928
RTD|      1.877|    500.677|   1015.627|     113|     0|      0.451|
1023.928
RTD|      1.913|    500.626|   1023.206|     123|     0|      0.451|
1023.928
RTD|      2.147|    499.681|   1021.131|     130|     0|      0.451|
1023.928
RTD|      2.310|    499.657|   1018.334|     138|     0|      0.451|
1023.928
RTD|      1.985|    528.075|   1024.379|     200|     0|      0.451|
1024.379
RTD|      1.606|    501.711|   1021.185|     212|     0|      0.451|
1024.379
RTD|      1.209|    500.779|   1016.258|     222|     0|      0.451|
1024.379
RTD|      1.696|    502.834|   1013.642|     237|     0|      0.451|
1024.379
RTD|      1.750|    501.732|   1023.116|     248|     0|      0.451|
1024.379
RTD|      1.876|    501.743|   1021.401|     260|     0|      0.451|
1024.379
RTD|      0.902|    499.871|   1014.995|     269|     0|      0.451|
1024.379
RTT|  00:00:23  (in-kernel periodic task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat
worst
RTD|      1.443|    499.834|   1012.469|     277|     0|      0.451|
1024.379
RTD|      1.299|    501.788|   1018.063|     288|     0|      0.451|
1024.379
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      0.451|    502.073|   1024.379|     288|     0|
00:00:25/00:00:25
[root@domain.hid bin]# ./latency -t 2
== Sampling period: 1000 us
== Test mode: in-kernel timer handler
== All results in microseconds
warming up...
RTT|  00:00:01  (in-kernel timer handler, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat
worst
RTD|    -15.934|    490.442|   1000.830|       2|     0|    -15.934|
1000.830
RTD|    -16.006|    490.552|   1013.461|       4|     0|    -16.006|
1013.461
RTD|    -15.844|    490.457|   1004.619|       6|     0|    -16.006|
1013.461
RTD|    -16.151|    490.493|   1002.995|       8|     0|    -16.151|
1013.461
RTD|    -15.736|    490.448|   1001.822|       9|     0|    -16.151|
1013.461
RTD|    -16.205|    489.447|   1000.559|      10|     0|    -16.205|
1013.461
RTD|    -16.025|    491.427|   1011.386|      14|     0|    -16.205|
1013.461
RTD|    -16.097|    490.469|   1004.348|      15|     0|    -16.205|
1013.461
RTD|    -15.971|    490.493|   1004.096|      17|     0|    -16.205|
1013.461
RTD|    -15.952|    489.481|   1006.063|      18|     0|    -16.205|
1013.461
RTD|    -16.061|    490.486|   1004.439|      19|     0|    -16.205|
1013.461
RTD|    -16.115|    490.451|   1006.423|      21|     0|    -16.205|
1013.461
RTD|    -16.115|    491.411|   1003.987|      26|     0|    -16.205|
1013.461
RTD|    -16.187|    489.493|    999.837|      26|     0|    -16.205|
1013.461
RTD|    -15.862|    490.445|   1004.890|      28|     0|    -16.205|
1013.461
RTD|    -16.115|    490.491|   1000.198|      29|     0|    -16.205|
1013.461
RTD|    -16.205|    491.453|   1008.047|      34|     0|    -16.205|
1013.461
RTD|    -16.025|    490.457|   1004.799|      36|     0|    -16.205|
1013.461
RTD|    -16.115|    490.476|   1002.544|      38|     0|    -16.205|
1013.461
RTD|    -16.115|    490.469|   1002.453|      40|     0|    -16.205|
1013.461
RTD|    -16.025|    490.447|   1004.980|      42|     0|    -16.205|
1013.461
RTT|  00:00:22  (in-kernel timer handler, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat
worst
RTD|    -16.187|    490.494|   1002.814|      43|     0|    -16.205|
1013.461

[-- Attachment #1.2: Type: text/html, Size: 8064 bytes --]

[-- Attachment #2: xeno configs --]
[-- Type: application/octet-stream, Size: 2458 bytes --]

 CONFIG_XENOMAI=y
CONFIG_XENO_GENERIC_STACKPOOL=y
CONFIG_XENO_FASTSYNCH_DEP=y
CONFIG_XENO_FASTSYNCH=y
CONFIG_XENO_OPT_NUCLEUS=y
CONFIG_XENO_OPT_PERVASIVE=y
CONFIG_XENO_OPT_PRIOCPL=y
CONFIG_XENO_OPT_PIPELINE_HEAD=y
# CONFIG_XENO_OPT_SCHED_CLASSES is not set
CONFIG_XENO_OPT_VFILE=y
CONFIG_XENO_OPT_REGISTRY_NRSLOTS=512
CONFIG_XENO_OPT_SYS_HEAPSZ=256
CONFIG_XENO_OPT_SYS_STACKPOOLSZ=128
CONFIG_XENO_OPT_SEM_HEAPSZ=12
CONFIG_XENO_OPT_GLOBAL_SEM_HEAPSZ=12
CONFIG_XENO_OPT_STATS=y
# CONFIG_XENO_OPT_DEBUG is not set
# CONFIG_XENO_OPT_SHIRQ is not set
CONFIG_XENO_OPT_HOSTRT=y

#
# Timing
#
# CONFIG_XENO_OPT_TIMING_PERIODIC is not set
CONFIG_XENO_OPT_TIMING_VIRTICK=1000
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
# CONFIG_XENO_OPT_TIMER_WHEEL is not set

#
# Machine
#
CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH=y
CONFIG_XENO_HW_FPU=y
CONFIG_XENO_HW_UNLOCKED_SWITCH=y

#
# Interfaces
#
CONFIG_XENO_SKIN_NATIVE=y
CONFIG_XENO_OPT_NATIVE_PERIOD=0
# CONFIG_XENO_OPT_NATIVE_PIPE is not set
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_BUFFER=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=y
CONFIG_XENO_OPT_POSIX_PERIOD=0
# CONFIG_XENO_OPT_POSIX_SHM is not set
# CONFIG_XENO_OPT_POSIX_INTR is not set
# CONFIG_XENO_OPT_POSIX_SELECT is not set
# CONFIG_XENO_OPT_DEBUG_POSIX is not set
# CONFIG_XENO_SKIN_PSOS is not set
# CONFIG_XENO_SKIN_UITRON is not set
# CONFIG_XENO_SKIN_VRTX is not set
# CONFIG_XENO_SKIN_VXWORKS is not set
# CONFIG_XENO_OPT_NOWARN_DEPRECATED is not set
CONFIG_XENO_SKIN_RTDM=y
CONFIG_XENO_OPT_RTDM_PERIOD=0
CONFIG_XENO_OPT_RTDM_FILDES=128
# CONFIG_XENO_OPT_RTDM_SELECT is not set

#
# Drivers
#

#
# Serial drivers
#
# CONFIG_XENO_DRIVERS_16550A is not set

#
# Testing drivers
#
CONFIG_XENO_DRIVERS_TIMERBENCH=y
# CONFIG_XENO_DRIVERS_KLATENCY is not set
# CONFIG_XENO_DRIVERS_IRQBENCH is not set
CONFIG_XENO_DRIVERS_SWITCHTEST=y
# CONFIG_XENO_DRIVERS_RTDMTEST is not set

#
# CAN drivers
#
# CONFIG_XENO_DRIVERS_CAN is not set

#
# ANALOGY drivers
#
# CONFIG_XENO_DRIVERS_ANALOGY is not set

#
# Real-time IPC drivers
#
# CONFIG_XENO_DRIVERS_RTIPC is not set
# CONFIG_FREEZER is not set

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

* Re: [Xenomai-help] High latencies on ARM
  2012-02-16  9:38 [Xenomai-help] High latencies on ARM Alex Nikitenko
@ 2012-02-16 10:00 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2012-02-16 10:00 UTC (permalink / raw)
  To: Alex Nikitenko; +Cc: xenomai

On 02/16/2012 10:38 AM, Alex Nikitenko wrote:
> Hi all,
> 
> I continue my struggling with xenomai on Tiny6410 board. Kernel version -
> 2.6.36. Xenomai version is 2.6.0. The problem is actually in very high
> latencies (see log at the end).
> In kernel config I disabled all the stuff I'm not planing to use at the
> moment (touchscreen, video, audio, usb, networking).  I also disabled
> CONFIG_SYS_SUPPORTS_APM_EMULATION.
> 
> Xenomai related configs attached. Just in case I made some mistakes in
> configuring it.
> 
> Please, help me with the ideas what it could be.

Possible reasons:
- look for issues in the timer programming: the timer and clock
frequency may not be what you think they are, or may be too low, the
I-pipe for ARM is mostly tested with clock and timer using the same
frequency, so, there may be an undiscovered issue if timer and clock do
not use the same frequency.
- make sure that __ipipe_tsc_update() is called often enough (at least
once before the hardware counter wraps), if for instance you are using a
16 bits counter at 1 MHz, the wrap time is around 65 ms so, calling
__ipipe_tsc_update() in linux irq handler may not be enough, especially
if dynamic ticks are enabled, you need to call it in __ipipe_mach_acktimer.
- make sure that the idle loop does not enter in a deep sleep state.

Regards.

-- 
					    Gilles.


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

end of thread, other threads:[~2012-02-16 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16  9:38 [Xenomai-help] High latencies on ARM Alex Nikitenko
2012-02-16 10:00 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.