* [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138)
@ 2012-12-15 12:07 GUGLIELMO NAVARRA
2012-12-15 12:20 ` Gilles Chanteperdrix
2012-12-15 12:35 ` Gilles Chanteperdrix
0 siblings, 2 replies; 11+ messages in thread
From: GUGLIELMO NAVARRA @ 2012-12-15 12:07 UTC (permalink / raw)
To: xenomai@xenomai.org
Hello,
I ported i-pipe to the board da850 with TI L138 CPU.
I have no problems during startup, the system starts quietly.
I followed the guide http://www.xenomai.org/index.php/I-pipe-core:ArmPorting,
the only thing that I did not (because do not use ) are the changes to the GPIO module.
When I run latency program in "user-task period" mode, the latency shows great numbers and even negative,
which does not happen if i run latency in "in-kernel task period" mode, with more normal numbers.
Of course, before you run latency test, sending "echo 0 > /proc/xenomai/latency".
If I use cyclictest, the numbers are more correct. What could be the problem?
Is there any mistake I made or that I missed in porting?
Thanks
root@Board<mailto:root@Board> ~>./usr/xenomai/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| 370370.370| 918802.551|1418302.551| 0| 0| 370370.370|1418302.551
RTD| 370370.370| -81197.449| 418302.551| 0| 0| 370370.370|1418302.551
RTD| 370370.370|-1081197.448|-581697.448| 0| 0| 370370.370|1418302.551
RTD| 370370.370|-2081197.447|-1581697.448| 0| 0| 370370.370|1418302.55
1
RTD| 370370.370|1213769.849|1713269.849| 0| 0| 370370.370|1418302.551
RTD| 370370.370| 213769.850| 713269.849| 0| 0| 370370.370|1418302.551
RTD| 370370.370|-786230.150|-286730.150| 0| 0| 370370.370|1418302.551
RTD| 370370.370|-1786230.149|-1286730.149| 0| 0| 370370.370|1418302.55
1
RTD| 370370.370|1508737.148|2008237.147| 0| 0| 370370.370|1418302.551
RTD| 370370.370| 508737.148|1008237.148| 0| 0| 370370.370|1418302.551
RTD| 370370.370|-491262.851| 8237.148| 0| 0| 370370.370|1418302.551
RTD| 370370.370|-1491262.851|-991762.851| 0| 0| 370370.370|1418302.551
RTD| 370370.370|1803704.446|-1991762.850| 0| 0| 370370.370|1418302.551
RTD| 370370.370| 803704.447|1303204.446| 0| 0| 370370.370|1418302.551
RTD| 370370.370|-196295.553| 303204.447| 0| 0| 370370.370|1418302.551
?---|-----------|-----------|-----------|--------|------|-----------------------
--
RTS| 370370.370|-1786230.149|1418302.551| 0| 0| 00:00:15/00:00:15
root@Board<mailto:root@Board> ~>
root@Board<mailto:root@Board> ~>./usr/xenomai/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| 68.740| 77.299| 130.925| 0| 0| 68.740| 130.925
RTD| 67.554| 76.997| 132.776| 0| 0| 67.554| 132.776
RTD| 68.887| 77.536| 128.924| 0| 0| 67.554| 132.776
RTD| 65.368| 77.235| 136.405| 0| 0| 65.368| 136.405
RTD| 68.145| 77.162| 130.441| 0| 0| 65.368| 136.405
RTD| 68.144| 77.070| 133.292| 0| 0| 65.368| 136.405
RTD| 67.366| 77.239| 129.070| 0| 0| 65.368| 136.405
RTD| 67.514| 77.109| 128.921| 0| 0| 65.368| 136.405
RTD| 68.513| 77.471| 129.031| 0| 0| 65.368| 136.405
RTD| 66.994| 76.907| 132.920| 0| 0| 65.368| 136.405
RTD| 67.956| 77.237| 135.216| 0| 0| 65.368| 136.405
RTD| 67.141| 77.440| 138.104| 0| 0| 65.368| 138.104
RTD| 66.029| 77.157| 130.622| 0| 0| 65.368| 138.104
RTD| 67.436| 77.194| 128.843| 0| 0| 65.368| 138.104
RTD| 67.176| 77.353| 130.732| 0| 0| 65.368| 138.104
?---|-----------|-----------|-----------|--------|------|-----------------------
--
RTS| 65.368| 77.227| 138.104| 0| 0| 00:00:16/00:00:16
root@Board<mailto:root@Board> ~>
Startup kernel log:
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 3.2.21-ipipe (omap@Sviluppo<mailto:omap@Sviluppo>) (gcc version 4.6.3 (Sourcery CodeBenc
h Lite 2012.03-57) ) #56 PREEMPT Sat Dec 15 12:11:05 CET 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DA850/OMAP-L138/AM18x EVM
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writethrough
DaVinci da850/omap-l138 variant 0x0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: mem=32M ip=192.168.1.141 console=ttyS2,115200n8 root=/dev/m
mcblk0p1 rootfstype=ext2 earlyprintk=serial,ttyS2,115200
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 27168k/27168k available, 5600k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc2800000 - 0xfea00000 ( 962 MB)
lowmem : 0xc0000000 - 0xc2000000 ( 32 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0475978 (4535 kB)
.init : 0xc0476000 - 0xc0499000 ( 140 kB)
.data : 0xc049a000 - 0xc04c5ff8 ( 176 kB)
.bss : 0xc04c601c - 0xc0526ce8 ( 388 kB)
NR_IRQS:245
*** Davinci Clock Rate : 27000000 ***
*** Clock Reload : 270000 ***
I-pipe, 27.000 MHz clocksource
Interrupt pipeline (release #1)
Console: colour dummy device 80x30
Calibrating delay loop... 167.32 BogoMIPS (lpj=836608)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 144 gpio irqs
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
pca953x 1-0020: failed reading register
pca953x: probe of 1-0020 failed with error -121
pca953x 1-0021: interrupt support not compiled in
Switching to clocksource ipipe_tsc
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
EMAC: MII PHY configured, RMII PHY will not be functional
I-pipe: head domain Xenomai registered.
Xenomai: hal/arm started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.6.1 (Light Years Away) loaded.
Xenomai: debug mode enabled.
Xenomai: starting native API services.
Xenomai: starting POSIX services.
Xenomai: starting RTDM services.
msgmni has been set to 53
io scheduler noop registered (default)
start plist test
end plist test
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A
ÿserial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A
console [ttyS2] enabled, bootconsole disabled
console [ttyS2] enabled, bootconsole disabled
brd: module loaded
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
input: gpio-keys-polled as /devices/platform/gpio-keys-polled.1/input/input0
i2c /dev entries driver
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
TCP cubic registered
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
davinci_mdio davinci_mdio.0: resetting idled controller
net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, id=7c0f1)
mmc0: new SD card at address e624
mmcblk0: mmc0:e624 SD128 120 MiB
mmcblk0: p1
PHY: 0:00 - Link is Up - 100/Full
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.1.141, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.141, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
EXT2-fs (mmcblk0p1): warning: mounting unchecked fs, running e2fsck is recommend
ed
VFS: Mounted root (ext2 filesystem) on device 179:1.
Freeing init memory: 140K
init started: BusyBox v1.20.0 (2012-05-31 14:27:57 CEST)
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138)
2012-12-15 12:07 [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138) GUGLIELMO NAVARRA
@ 2012-12-15 12:20 ` Gilles Chanteperdrix
[not found] ` <7385E066AECB78449EEDFA7EE2A2B2B60A052DA8@DB3PRD0410MB355.eurprd04.prod.outlook.com>
2012-12-15 12:35 ` Gilles Chanteperdrix
1 sibling, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-12-15 12:20 UTC (permalink / raw)
To: GUGLIELMO NAVARRA; +Cc: xenomai@xenomai.org
On 12/15/2012 01:07 PM, GUGLIELMO NAVARRA wrote:
> Hello,
> I ported i-pipe to the board da850 with TI L138 CPU.
> I have no problems during startup, the system starts quietly.
> I followed the guide http://www.xenomai.org/index.php/I-pipe-core:ArmPorting,
> the only thing that I did not (because do not use ) are the changes to the GPIO module.
> When I run latency program in "user-task period" mode, the latency shows great numbers and even negative,
> which does not happen if i run latency in "in-kernel task period" mode, with more normal numbers.
> Of course, before you run latency test, sending "echo 0 > /proc/xenomai/latency".
>
> If I use cyclictest, the numbers are more correct. What could be the problem?
> Is there any mistake I made or that I missed in porting?
You probably got the user-space "high resolution counter" (tsc)
emulation wrong. In order to check if the user-space tsc emulation runs
correctly, try the "tsc" test. The only reasons I already saw for the
emulation to run correctly in kernel-space but not in user-space are:
- you are passing the wrong physical address in the "struct
__ipipe_tscinfo" structure, this error only affects user-space
- the processor is configured to forbid access to the timers registers
in user-space, you have to change the configuration to allow it.
--
Gilles.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138)
2012-12-15 12:07 [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138) GUGLIELMO NAVARRA
2012-12-15 12:20 ` Gilles Chanteperdrix
@ 2012-12-15 12:35 ` Gilles Chanteperdrix
1 sibling, 0 replies; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-12-15 12:35 UTC (permalink / raw)
To: GUGLIELMO NAVARRA; +Cc: xenomai@xenomai.org
On 12/15/2012 01:07 PM, GUGLIELMO NAVARRA wrote:
> Hello,
> I ported i-pipe to the board da850 with TI L138 CPU.
> I have no problems during startup, the system starts quietly.
> I followed the guide http://www.xenomai.org/index.php/I-pipe-core:ArmPorting,
> the only thing that I did not (because do not use ) are the changes to the GPIO module.
Maybe the documentation is not clear enough, but you have to make the
changes to multiplexed GPIO irq handlers, otherwise all hell will break
loose when such an irq will happen, even in the absence of real-time
drivers.
Also, if your processor is an armv4 or armv5, you should consider
enabling the FCSE.
--
Gilles.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138)
@ 2012-12-15 15:47 GUGLIELMO NAVARRA
2012-12-15 15:56 ` GUGLIELMO NAVARRA
0 siblings, 1 reply; 11+ messages in thread
From: GUGLIELMO NAVARRA @ 2012-12-15 15:47 UTC (permalink / raw)
To: xenomai@xenomai.org
Da: Gilles Chanteperdrix [gilles.chanteperdrix@xenomai.org]
Inviato: sabato 15 dicembre 2012 15.54
> Anyway, I also asked you to run the "tsc" test, what does this test tell
> you?
In the structure tsc_info must assign addresses (phy and virt) of timer assigned to clocksource or clockevent?
I have assigned the offset of timer assigned to clockevent (base address is the same because the timer is 64-bit)
static void l138_xenomai_tsc_init(void)
{
struct davinci_soc_info *soc_info = &davinci_soc_info;
struct davinci_timer_instance *dtip = soc_info->timer_info->timers;
void __iomem *base;
base = ioremap(dtip[0].base, SZ_4K);
tsc_info.type = IPIPE_TSC_TYPE_FREERUNNING;
tsc_info.freq = l138_clock_tick_rate;
tsc_info.counter_vaddr = (unsigned long)(base + TIM12);
tsc_info.u.counter_paddr = dtip[0].base + TIM12;
tsc_info.u.fr.mask = 0xffffffff;
__ipipe_tsc_register(&tsc_info);
}
and in the board declaration:
static struct davinci_timer_instance da850_timer_instance[4] = {
{
.base = DA8XX_TIMER64P0_BASE,
.bottom_irq = IRQ_DA8XX_TINT12_0,
.top_irq = IRQ_DA8XX_TINT34_0,
},
{
.base = DA8XX_TIMER64P1_BASE,
.bottom_irq = IRQ_DA8XX_TINT12_1,
.top_irq = IRQ_DA8XX_TINT34_1,
},
{
.base = DA850_TIMER64P2_BASE,
.bottom_irq = IRQ_DA850_TINT12_2,
.top_irq = IRQ_DA850_TINT34_2,
},
{
.base = DA850_TIMER64P3_BASE,
.bottom_irq = IRQ_DA850_TINT12_3,
.top_irq = IRQ_DA850_TINT34_3,
},
};
Result not change
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138)
2012-12-15 15:47 GUGLIELMO NAVARRA
@ 2012-12-15 15:56 ` GUGLIELMO NAVARRA
0 siblings, 0 replies; 11+ messages in thread
From: GUGLIELMO NAVARRA @ 2012-12-15 15:56 UTC (permalink / raw)
To: xenomai@xenomai.org
>GUGLIELMO NAVARRA [guglielmo.navarra@studenti.uniparthenope.it]
>Inviato: sabato 15 dicembre 2012 16.47
>A: xenomai@xenomai.org
>Oggetto: Re: [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138)
>Da: Gilles Chanteperdrix [gilles.chanteperdrix@xenomai.org]
>Inviato: sabato 15 dicembre 2012 15.54
> Anyway, I also asked you to run the "tsc" test, what does this test tell
> you?
>In the structure tsc_info must assign addresses (phy and virt) of timer assigned to clocksource or clockevent?
>I have assigned the offset of timer assigned to clockevent (base address is the same because the timer is 64-bit)
>static void l138_xenomai_tsc_init(void)
>{
>struct davinci_soc_info *soc_info = &davinci_soc_info;
>struct davinci_timer_instance *dtip = soc_info->timer_info->timers;
>void __iomem *base;
>base = ioremap(dtip[0].base, SZ_4K);
>tsc_info.type = IPIPE_TSC_TYPE_FREERUNNING;
>tsc_info.freq = l138_clock_tick_rate;
>tsc_info.counter_vaddr = (unsigned long)(base + TIM12);
>tsc_info.u.counter_paddr = dtip[0].base + TIM12;
>tsc_info.u.fr.mask = 0xffffffff;
>__ipipe_tsc_register(&tsc_info);
>}
The changes above I changed the offset from TIM12 to TIM34 (clocksource) and when run latency shows good results:
root@Board ~>./usr/xenomai/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| 89.407| 102.592| 163.481| 0| 0| 89.407| 163.481
RTD| 91.518| 103.296| 161.370| 0| 0| 89.407| 163.481
RTD| 91.296| 103.185| 173.814| 0| 0| 89.407| 173.814
RTD| 88.962| 103.037| 165.555| 0| 0| 88.962| 173.814
RTD| 91.259| 102.370| 163.444| 0| 0| 88.962| 173.814
RTD| 91.962| 103.111| 162.555| 0| 0| 88.962| 173.814
RTD| 91.592| 103.148| 174.518| 0| 0| 88.962| 174.518
RTD| 91.370| 103.037| 173.444| 0| 0| 88.962| 174.518
RTD| 92.148| 102.629| 161.777| 0| 0| 88.962| 174.518
RTD| 92.851| 103.296| 167.370| 0| 0| 88.962| 174.518
RTD| 91.888| 103.148| 173.777| 0| 0| 88.962| 174.518
RTD| 91.629| 103.370| 176.629| 0| 0| 88.962| 176.629
RTD| 92.037| 102.814| 164.777| 0| 0| 88.962| 176.629
RTD| 92.518| 102.592| 160.851| 0| 0| 88.962| 176.629
RTD| 91.481| 103.148| 165.962| 0| 0| 88.962| 176.629
RTD| 91.037| 102.851| 161.740| 0| 0| 88.962| 176.629
RTD| 91.444| 102.666| 164.333| 0| 0| 88.962| 176.629
RTD| 91.407| 102.740| 164.037| 0| 0| 88.962| 176.629
RTD| 78.481| 102.962| 164.703| 0| 0| 78.481| 176.629
RTD| 92.481| 103.333| 163.481| 0| 0| 78.481| 176.629
RTD| 91.999| 102.814| 167.074| 0| 0| 78.481| 176.629
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| 91.222| 103.074| 169.481| 0| 0| 78.481| 176.629
RTD| 91.518| 103.444| 164.037| 0| 0| 78.481| 176.629
RTD| 92.074| 103.296| 167.185| 0| 0| 78.481| 176.629
?---|-----------|-----------|-----------|--------|------|-----------------------
--
RTS| 78.481| 102.962| 176.629| 0| 0| 00:00:24/00:00:24
root@Board ~>
Thank you for your advice Gilles.
Now I will test hard with a load.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-12-15 15:59 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-15 12:07 [Xenomai] [Xenomai-help] Latency calculation on da850 (Omap L138) GUGLIELMO NAVARRA
2012-12-15 12:20 ` Gilles Chanteperdrix
[not found] ` <7385E066AECB78449EEDFA7EE2A2B2B60A052DA8@DB3PRD0410MB355.eurprd04.prod.outlook.com>
2012-12-15 13:56 ` Gilles Chanteperdrix
2012-12-15 14:06 ` Gilles Chanteperdrix
2012-12-15 14:42 ` GUGLIELMO NAVARRA
2012-12-15 14:50 ` Gilles Chanteperdrix
2012-12-15 14:54 ` Gilles Chanteperdrix
[not found] ` <7385E066AECB78449EEDFA7EE2A2B2B60A052E0D@DB3PRD0410MB355.eurprd04.prod.outlook.com>
2012-12-15 15:59 ` Gilles Chanteperdrix
2012-12-15 12:35 ` Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2012-12-15 15:47 GUGLIELMO NAVARRA
2012-12-15 15:56 ` GUGLIELMO NAVARRA
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.