All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] User Space Problems
@ 2014-02-21 14:31 Bruno Tunes de Mello
  2014-02-21 14:46 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-02-21 14:31 UTC (permalink / raw)
  To: xenomai

Hi,

I'm using a Sabre Lite board with IMX6Q for a project. 
I 
installed xenomai with the kernel 3.0.35 from boundary Devices, its not 
the version indicated in README file, but I applied the patches and it 
seems work. When it boots can see the messages:

I-pipe: Domain Xenomai registered.
Xenomai: hal/arm started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.6.3 (Lies and Truths) loaded.
Xenomai: debug mode enabled.
Xenomai: starting native API services.
Xenomai: starting POSIX services.
Xenomai: starting RTDM services.

But the user space is not working. When I try to execute latency and xeno-test commands I get a error message: not
 found.

linaro@linaro-alip:/usr/xenomai/bin$ ./latency
bash: ./latency: No such file or directory
linaro@linaro-alip:/usr/xenomai/bin$ ./xeno-test
bash: ./xeno-test: /usr/xenomai/bin/xeno-test-run: bad interpreter: No such file or directory
linaro@linaro-alip:/usr/xenomai/bin$ sudo ./xeno latency
./xeno: 15: exec: /usr/xenomai/bin/latency: not found

The only command that work is xeno-config. I started using Linux for this project so I don't know how to solve it.

I
 tried to search some solution on mailing list, but anything yet. In 
troubleshooting guide I read about EABI and OABI compilers mismatch, but
 I compiled both kernel and user space with Linaro toolchain 
(arm-linux-gnueabi). I tried with Ubuntu cross-compiler too 
(arm-linux-gnueabihf), but same result.

Thanks,
Bruno

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

* Re: [Xenomai] User Space Problems
  2014-02-21 14:31 [Xenomai] User Space Problems Bruno Tunes de Mello
@ 2014-02-21 14:46 ` Gilles Chanteperdrix
  2014-02-23 23:32   ` Bruno Tunes de Mello
  0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-02-21 14:46 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 02/21/2014 03:31 PM, Bruno Tunes de Mello wrote:
> Hi,
>
> I'm using a Sabre Lite board with IMX6Q for a project.
> I
> installed xenomai with the kernel 3.0.35 from boundary Devices, its not
> the version indicated in README file, but I applied the patches and it
> seems work. When it boots can see the messages:
>
> I-pipe: Domain Xenomai registered.
> Xenomai: hal/arm started.
> Xenomai: scheduling class idle registered.
> Xenomai: scheduling class rt registered.
> Xenomai: real-time nucleus v2.6.3 (Lies and Truths) loaded.
> Xenomai: debug mode enabled.
> Xenomai: starting native API services.
> Xenomai: starting POSIX services.
> Xenomai: starting RTDM services.
>
> But the user space is not working. When I try to execute latency and xeno-test commands I get a error message: not
>   found.
>
> linaro@linaro-alip:/usr/xenomai/bin$ ./latency
> bash: ./latency: No such file or directory
> linaro@linaro-alip:/usr/xenomai/bin$ ./xeno-test
> bash: ./xeno-test: /usr/xenomai/bin/xeno-test-run: bad interpreter: No such file or directory
> linaro@linaro-alip:/usr/xenomai/bin$ sudo ./xeno latency
> ./xeno: 15: exec: /usr/xenomai/bin/latency: not found
>
> The only command that work is xeno-config. I started using Linux for this project so I don't know how to solve it.
>
> I
>   tried to search some solution on mailing list, but anything yet. In
> troubleshooting guide I read about EABI and OABI compilers mismatch, but
>   I compiled both kernel and user space with Linaro toolchain
> (arm-linux-gnueabi). I tried with Ubuntu cross-compiler too
> (arm-linux-gnueabihf), but same result.

Xenomai user-space support is probably mis-compiled:
- either you did not compile it for ARM;
- or you compile it with a toolchain which is not the same as the one 
used to generate the rest of the root filesystem.


-- 
					    Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-02-21 14:46 ` Gilles Chanteperdrix
@ 2014-02-23 23:32   ` Bruno Tunes de Mello
  2014-02-23 23:37     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-02-23 23:32 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,

The problem was the second statement: the toolchain I was using is diferente from the used on root filesystem. My filesystem is a recent version from Linaro, but I was using an old Linaro toolchain version (4.7, I think), then I changed to the new version (4.8) and I can run now Xenomai commands. Thanks.
I had to recompile the kernel too because I didn't disable CONFIG_CPU_FREQ and CONFIG_CPU_FREQ_IMX (I got unexpected values).

I have only one more question. I executed the latency command and, initially, I was getting latencies with negative numbers. But executing the command some times, it appear ok. Below a result with no load.
linaro@linaro-alip:/usr/xenomai/bin$ sudo ./latency 
== 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|      1.255|      1.383|      4.184|       0|     0|      1.255|      4.184
RTD|      1.265|      1.656|     13.080|       0|     0|      1.255|     13.080
RTD|      1.260|      1.502|     17.409|       0|     0|      1.255|     17.409
RTD|      1.267|      1.499|     14.593|       0|     0|      1.255|     17.409
RTD|      1.260|      1.525|     12.126|       0|     0|      1.255|     17.409
RTD|      1.249|      1.709|     12.853|       0|     0|      1.249|     17.409
RTD|      1.260|      1.512|     18.265|       0|     0|      1.249|     18.265
RTD|      1.257|      1.522|     17.191|       0|     0|      1.249|     18.265
RTD|      1.260|      1.492|     14.492|       0|     0|      1.249|     18.265
RTD|      1.257|      1.671|     13.712|       0|     0|      1.249|     18.265
RTD|      1.244|      1.510|     14.555|       0|     0|      1.244|     18.265
RTD|      1.239|      1.484|     13.525|       0|     0|      1.239|     18.265
RTD|      1.272|      1.532|     17.608|       0|     0|      1.239|     18.265
RTD|      1.262|      1.661|     13.472|       0|     0|      1.239|     18.265
RTD|      1.270|      1.487|     16.542|       0|     0|      1.239|     18.265
RTD|      1.267|      1.717|     15.383|       0|     0|      1.239|     18.265
RTD|      1.249|      1.507|     16.411|       0|     0|      1.239|     18.265
RTD|      1.242|      1.661|     17.873|       0|     0|      1.239|     18.265
RTD|      1.234|      1.494|     12.537|       0|     0|      1.234|     18.265
RTD|      1.277|      1.699|     13.628|       0|     0|      1.234|     18.265
RTD|      1.262|      1.502|     16.914|       0|     0|      1.234|     18.265
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|      1.262|      1.661|     12.856|       0|     0|      1.234|     18.265
RTD|      1.270|      1.510|     12.661|       0|     0|      1.234|     18.265
RTD|      1.270|      1.492|     17.161|       0|     0|      1.234|     18.265
RTD|      1.227|      1.499|     15.984|       0|     0|      1.227|     18.265
RTD|      1.280|      1.712|     15.186|       0|     0|      1.227|     18.265
RTD|      1.249|      1.515|     16.888|       0|     0|      1.227|     18.265
RTD|      1.255|      1.593|     13.333|       0|     0|      1.227|     18.265
RTD|      1.267|      1.489|     16.810|       0|     0|      1.227|     18.265
RTD|      1.252|      1.664|     13.318|       0|     0|      1.227|     18.265
RTD|      1.267|      1.479|     11.202|       0|     0|      1.227|     18.265
RTD|      1.249|      1.497|     12.868|       0|     0|      1.227|     18.265
RTD|      1.265|      1.517|     16.853|       0|     0|      1.227|     18.265
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      1.227|      1.555|     18.265|       0|     0|    00:00:34/00:00:34

I was getting large values too (lat avg, lat max), sometimes more than 2000 us. But with a 'top' command I verified that there were processes using more than 80% of CPU, so I think it's the cause of these values. I executed a xeno-test command and I got the partial result below.
Started child 11510: dohell 900
Started child 11512: /usr/xenomai/bin/latency
== 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|      4.530|     10.681|     20.570|       0|     0|      4.530|     20.570
RTD|      4.588|     11.494|    309.452|       0|     0|      4.530|    309.452
RTD|      4.580|     10.944|     37.656|       0|     0|      4.530|    309.452
RTD|      4.489|     11.696|    492.573|       0|     0|      4.489|    492.573
RTD|      4.489|     11.303|    460.818|       0|     0|      4.489|    492.573
RTD|      4.085|     11.704|    133.328|       0|     0|      4.085|    492.573
RTD|      8.707|     13.636|    656.525|       0|     0|      4.085|    656.525
RTD|      4.967|     13.671|    664.366|       0|     0|      4.085|    664.366
RTD|      6.108|     12.156|     50.393|       0|     0|      4.085|    664.366
RTD|      3.957|     12.883|    384.060|       0|     0|      3.957|    664.366
RTD|      4.022|     12.578|    962.146|       0|     0|      3.957|    962.146
RTD|      3.982|     12.565|   1080.361|       1|     0|      3.957|   1080.361
RTD|      4.507|     10.906|    452.252|       1|     0|      3.957|   1080.361
RTD|      4.845|     11.047|    112.396|       1|     0|      3.957|   1080.361
RTD|      4.803|     10.782|     55.315|       1|     0|      3.957|   1080.361
RTD|      3.906|     10.464|   1043.691|       2|     0|      3.906|   1080.361
RTD|      3.959|      8.335|     46.666|       2|     0|      3.906|   1080.361
RTD|      4.042|     10.772|     45.176|       2|     0|      3.906|   1080.361
RTD|      3.999|     11.555|    696.714|       2|     0|      3.906|   1080.361
RTD|      4.010|     10.982|     35.601|       2|     0|      3.906|   1080.361
RTD|      3.972|     11.550|     42.679|       2|     0|      3.906|   1080.361
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|      4.303|     12.760|     43.477|       2|     0|      3.906|   1080.361
RTD|      3.636|     10.439|    208.924|       2|     0|      3.636|   1080.361
RTD|      3.681|     13.588|    820.573|       2|     0|      3.636|   1080.361
RTD|      4.065|     14.502|    885.888|       2|     0|      3.636|   1080.361
RTD|      3.987|     14.954|    989.131|       2|     0|      3.636|   1080.361
RTD|      3.926|     14.542|   1383.499|       3|     0|      3.636|   1383.499
RTD|      3.853|     14.560|   1154.987|       4|     0|      3.636|   1383.499
RTD|      4.659|     13.555|    924.207|       4|     0|      3.636|   1383.499
RTD|      3.893|     13.777|    663.159|       4|     0|      3.636|   1383.499
RTD|      4.426|     13.454|    808.964|       4|     0|      3.636|   1383.499
RTD|      4.744|     14.840|    827.146|       4|     0|      3.636|   1383.499
RTD|      4.386|     12.659|    572.785|       4|     0|      3.636|   1383.499
RTD|      3.999|     15.138|   1152.191|       5|     0|      3.636|   1383.499
RTD|      3.954|     14.227|    993.108|       5|     0|      3.636|   1383.499
RTD|      4.489|     12.805|    666.755|       5|     0|      3.636|   1383.499
RTD|      3.921|     12.608|    703.176|       5|     0|      3.636|   1383.499
RTD|      4.022|     12.424|    574.785|       5|     0|      3.636|   1383.499
RTD|      4.553|     12.891|    717.265|       5|     0|      3.636|   1383.499
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      3.636|     12.446|   1383.499|       5|     0|    00:00:39/00:00:39

Could you say if these results are right or not.

Thank you for the reply,

Bruno





Em Sexta-feira, 21 de Fevereiro de 2014 11:46, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> escreveu:
 
On 02/21/2014 03:31 PM, Bruno Tunes de Mello wrote:

> Hi,
>
> I'm using a Sabre Lite board with IMX6Q for a project.
> I
> installed xenomai with the kernel 3.0.35 from boundary Devices, its not
> the version indicated in README file, but I applied the patches and it
> seems work. When it boots can see the messages:
>
> I-pipe: Domain Xenomai registered.
> Xenomai: hal/arm started.
> Xenomai: scheduling class idle registered.
> Xenomai: scheduling class rt registered.
> Xenomai: real-time nucleus v2.6.3 (Lies and Truths) loaded.
> Xenomai: debug mode enabled.
> Xenomai: starting native API services.
> Xenomai: starting POSIX services.
> Xenomai: starting RTDM services.
>
> But the user space is not working. When I try to execute latency and xeno-test commands I get a error message: not
>   found.
>
> linaro@linaro-alip:/usr/xenomai/bin$ ./latency
> bash: ./latency: No such file or directory
> linaro@linaro-alip:/usr/xenomai/bin$ ./xeno-test
> bash: ./xeno-test: /usr/xenomai/bin/xeno-test-run: bad interpreter: No such file or directory
> linaro@linaro-alip:/usr/xenomai/bin$ sudo ./xeno latency
> ./xeno: 15: exec: /usr/xenomai/bin/latency: not found
>
> The only command that work is xeno-config. I started using Linux for this project so I don't know how to solve it.
>
> I
>   tried to search some solution on mailing list, but anything yet. In
> troubleshooting guide I read about EABI and OABI compilers mismatch, but
>   I compiled both kernel and user space with Linaro toolchain
> (arm-linux-gnueabi). I tried with Ubuntu cross-compiler too
> (arm-linux-gnueabihf), but same result.

Xenomai user-space support is probably mis-compiled:
- either you did not compile it for ARM;
- or you compile it with a toolchain which is not the same as the one 
used to generate the rest of the root filesystem.


-- 
                        Gilles.

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

* Re: [Xenomai] User Space Problems
  2014-02-23 23:32   ` Bruno Tunes de Mello
@ 2014-02-23 23:37     ` Gilles Chanteperdrix
  2014-02-24  1:11       ` Bruno Tunes de Mello
  0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-02-23 23:37 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 02/24/2014 12:32 AM, Bruno Tunes de Mello wrote:
> ^C---|-----------|-----------|-----------|--------|------|-------------------------
> RTS|      3.636|     12.446|   1383.499|       5|     0|    00:00:39/00:00:39
> 
> Could you say if these results are right or not.

They are not right. Could you try the following (kernel) patch?

diff --git a/arch/arm/mach-mx6/mm.c b/arch/arm/mach-mx6/mm.c
index 3cf6b22..d1b74e9 100644
--- a/arch/arm/mach-mx6/mm.c
+++ b/arch/arm/mach-mx6/mm.c
@@ -97,7 +97,7 @@ void __init mx6_map_io(void)
 #ifdef CONFIG_CACHE_L2X0
 int mxc_init_l2x0(void)
 {
-	unsigned int val;
+	unsigned int val, aux_ctrl;
 
 	#define IOMUXC_GPR11_L2CACHE_AS_OCRAM 0x00000002
 
@@ -114,12 +114,24 @@ int mxc_init_l2x0(void)
 	val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
 	val |= 0x40800000;
 	writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
+#ifndef CONFIG_IPIPE
 	val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
 	val |= L2X0_DYNAMIC_CLK_GATING_EN;
 	val |= L2X0_STNDBY_MODE_EN;
 	writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
+#endif
+
+	aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
+		(0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
+		(0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT) |
+		(1 << 23) |
+		(1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
+		(1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
+		(1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
+		(1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
+
+	l2x0_init(IO_ADDRESS(L2_BASE_ADDR), aux_ctrl, L2X0_AUX_CTRL_MASK);
 
-	l2x0_init(IO_ADDRESS(L2_BASE_ADDR), 0x0, ~0x00000000);
 	return 0;
 }
 
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 1e2c52d..27550b3 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -421,6 +421,9 @@ void l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
 		writel_relaxed(1, l2x0_base + L2X0_CTRL);
 	}
 
+	/* Re-read it in case some bits are reserved. */
+	aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
+
 	outer_cache.inv_range = l2x0_inv_range;
 	outer_cache.clean_range = l2x0_clean_range;
 	outer_cache.flush_range = l2x0_flush_range;

-- 
                                                                Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-02-23 23:37     ` Gilles Chanteperdrix
@ 2014-02-24  1:11       ` Bruno Tunes de Mello
  2014-02-24 12:12         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-02-24  1:11 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,

I did the changes, but the kernel is not booting. I got the message from serial:
U-Boot 2013.01-00058-g5957f6d (Feb 11 2013 - 08:42:43)                       
                                                                             
CPU:   Freescale i.MX6Q rev1.2 at 792 MHz                                    
Reset cause: POR                        
Board: SABRE Lite                       
DRAM:  1 GiB                            
WARNING: Caches not enabled             
MMC:   FSL_SDHC: 0, FSL_SDHC: 1         
SF: Detected SST25VF016B with page size 4 KiB, total 2 MiB
*** Warning - bad CRC, using default environment

auto-detected panel HDMI
enable_hdmi: setup HDMI monitor
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   using phy at 6
FEC [PRIME]
Warning: FEC using MAC address from net device

Hit any key to stop autoboot:  0 
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part 
No port device detected!
** Bad device size - sata 0 **
** Bad device size - sata 0 **

SATA device 1: unknown device
** Bad device sata 1 **
** Bad device sata 1 **
MMC: no card present
mmc0(part 0) is current device
MMC: no card present
** Bad device mmc 0 **
MMC: no card present
** Bad device mmc 0 **
mmc1 is current device
** Unrecognized filesystem type **
2627 bytes read in 30 ms (85 KiB/s)
## Executing script at 10008000
Setting bus to 2
Valid chip addresses:
------ no Freescale display
Valid chip addresses:
------ no ft5x06 touch controller
Valid chip addresses:
------ no 800x480 display
** File not found /boot/imx6q-sabrelite.dtb **
only CEA modes allowed on HDMI port
3997932 bytes read in 378 ms (10.1 MiB/s)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Linux-3.0.35-ipipe
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3997868 Bytes = 3.8 MiB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.0.35-ipipe (bruno@bruno-Inspiron-N5010) (gcc version 4.8.2 20131014 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.10 - Lina4
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Boundary Devices Nitrogen6X/SABRE Lite Board
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6Q, silicon rev 1.2
PERCPU: Embedded 10 pages/cpu @8c008000 s16640 r8192 d16128 u40960
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227328
Kernel command line: enable_wait_mode=off video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off1
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 640MB 256MB = 896MB total
Memory: 899816k/899816k available, 148760k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xf4600000 - 0xffe00000   ( 184 MB)
    vmalloc : 0xc0800000 - 0xf2000000   ( 792 MB)
    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .init : 0x80008000 - 0x80046000   ( 248 kB)
      .text : 0x80046000 - 0x8077fdec   (7400 kB)
      .data : 0x80780000 - 0x807ddba0   ( 375 kB)
       .bss : 0x807ddbc4 - 0x8084f644   ( 455 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:624
MXC GPIO hardware
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
arm_max_freq=1GHz
MXC_Early serial console at MMIO 0x21e8000 (options '115200')
bootconsole [ttymxc1] enabled
I-pipe 1.18-13: pipeline enabled.
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
I-pipe, 396.000 MHz timer
I-pipe, 396.000 MHz clocksource
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
CPU1: Booted secondary processor
CPU2: Booted secondary processor
CPU3: Booted secondary processor
Brought up 4 CPUs
SMP: Total of 4 processors activated (6324.22 BogoMIPS).
devtmpfs: initialized
print_constraints: dummy: 
NET: Registered protocol family 16
print_constraints: vddpu: 725 <--> 1300 mV at 1150 mV fast normal 
print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal 
print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal 
print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal 
print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal 
print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal 
lcd_disable_pins
------------ Board type Sabre Lite
imx_add_mxc_pwm:pdata=  (null)
imx_add_mxc_pwm:pdata=  (null)
imx_add_mxc_pwm:pdata=807a82d0
imx_add_mxc_pwm:pdata=  (null)
Flexcan NXP tja1040
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
hw-breakpoint: maximum watchpoint size is 4 bytes.
L310 cache controller enabled
Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 1    Not tainted  (3.0.35-ipipe #6)
PC is at 0xbffac2f0
LR is at update_process_times+0x44/0x70
pc : [<bffac2f0>]    lr : [<8008d230>]    psr: 00000193
sp : bffadef8  ip : 00000001  fp : 00000000
r10: bffac010  r9 : 40063ff0  r8 : 00000001
r7 : 8c012040  r6 : 8004496c  r5 : 8079aae0  r4 : 20000013
r3 : 80041838  r2 : bff8e1c0  r1 : 20000193  r0 : 00000001
Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 1000404a  DAC: 00000015
Process swapper (pid: 0, stack limit = 0xbffac2f0)
Stack: (0xbffadef8 to 0xbffae000)
dee0:                                                       00000001 00000001
df00: 8079aae0 8004496c 00000000 00000001 8079aae0 8c01283c 00000000 800461e4
df20: 800411b8 00000020 807ea400 807ea3e0 00000001 800bef80 807ea404 80056940
df40: 807abea0 80041838 80044518 807ea3e0 00000000 bffadf80 f2a00100 0000001d
df60: 805b2cec 8079e1ec bffac000 00000000 00000000 80056a8c ffffffff 8004bc00
df80: 20000000 0000001d 20000000 f40dc010 8c012838 bffac000 807ddc84 805b2cec
dfa0: 8079e1ec 412fc09a 00000000 00000000 00000001 bffadfc8 8005cdb4 8005b56c
dfc0: 20000013 ffffffff 805b2cec 00000001 412fc09a 8004cee0 bffac000 8004d04c
dfe0: 4ffb006a 00000015 10c03c7d 807dde38 1000406a 105a4614 00000000 00000000
Unable to handle kernel paging request at virtual address 00303068
pgd = 80004000
[00303068] *pgd=00000000
Unable to handle kernel NULL pointer dereference at virtual address 00000000
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
pgd = 80004000
[00000000] *pgd=00000000
[00000000] *pgd=00000000

Unable to handle kernel paging request at virtual address f0000000
pgd = 80004000
[f0000000] *pgd=00000000

Thanks,
Bruno





Em Domingo, 23 de Fevereiro de 2014 20:37, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> escreveu:
 
On 02/24/2014 12:32 AM, Bruno Tunes de Mello wrote:
> ^C---|-----------|-----------|-----------|--------|------|-------------------------
> RTS|      3.636|     12.446|   1383.499|       5|     0|    00:00:39/00:00:39
> 
> Could you say if these results are right or not.

They are not right. Could you try the following (kernel) patch?

diff --git a/arch/arm/mach-mx6/mm.c b/arch/arm/mach-mx6/mm.c
index 3cf6b22..d1b74e9 100644
--- a/arch/arm/mach-mx6/mm.c
+++ b/arch/arm/mach-mx6/mm.c
@@ -97,7 +97,7 @@ void __init mx6_map_io(void)
#ifdef CONFIG_CACHE_L2X0
int mxc_init_l2x0(void)
{
-    unsigned int val;
+    unsigned int val, aux_ctrl;

    #define IOMUXC_GPR11_L2CACHE_AS_OCRAM 0x00000002

@@ -114,12 +114,24 @@ int mxc_init_l2x0(void)
    val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
    val |= 0x40800000;
    writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
+#ifndef CONFIG_IPIPE
    val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
    val |= L2X0_DYNAMIC_CLK_GATING_EN;
    val |= L2X0_STNDBY_MODE_EN;
    writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
+#endif
+
+    aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
+        (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
+        (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT) |
+        (1 << 23) |
+        (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
+        (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
+        (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
+        (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
+
+    l2x0_init(IO_ADDRESS(L2_BASE_ADDR), aux_ctrl, L2X0_AUX_CTRL_MASK);

-    l2x0_init(IO_ADDRESS(L2_BASE_ADDR), 0x0, ~0x00000000);
    return 0;
}

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 1e2c52d..27550b3 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -421,6 +421,9 @@ void l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
        writel_relaxed(1, l2x0_base + L2X0_CTRL);
    }

+    /* Re-read it in case some bits are reserved. */
+    aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
+
    outer_cache.inv_range = l2x0_inv_range;
    outer_cache.clean_range = l2x0_clean_range;
    outer_cache.flush_range = l2x0_flush_range;


-- 
                                                                Gilles.

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

* Re: [Xenomai] User Space Problems
  2014-02-24  1:11       ` Bruno Tunes de Mello
@ 2014-02-24 12:12         ` Gilles Chanteperdrix
  2014-02-25  3:26           ` Bruno Tunes de Mello
  0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-02-24 12:12 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 02/24/2014 02:11 AM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> 
> I did the changes, but the kernel is not booting.

Ok, you are the second to report this issue, so the patch must
be touching bits it should not touch. Please try that one instead:

diff --git a/arch/arm/mach-mx6/mm.c b/arch/arm/mach-mx6/mm.c
index 3cf6b22..d89393c 100644
--- a/arch/arm/mach-mx6/mm.c
+++ b/arch/arm/mach-mx6/mm.c
@@ -97,7 +97,7 @@ void __init mx6_map_io(void)
 #ifdef CONFIG_CACHE_L2X0
 int mxc_init_l2x0(void)
 {
-	unsigned int val;
+	unsigned int val, aux_ctrl;
 
 	#define IOMUXC_GPR11_L2CACHE_AS_OCRAM 0x00000002
 
@@ -114,12 +114,28 @@ int mxc_init_l2x0(void)
 	val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
 	val |= 0x40800000;
 	writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
+#ifndef CONFIG_IPIPE
 	val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
 	val |= L2X0_DYNAMIC_CLK_GATING_EN;
 	val |= L2X0_STNDBY_MODE_EN;
 	writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
+#endif
+
+#if 0
+	aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
+		(0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
+		(0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT) |
+		(1 << 23) |
+		(1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
+		(1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
+		(1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
+		(1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
+
+	l2x0_init(IO_ADDRESS(L2_BASE_ADDR), aux_ctrl, L2X0_AUX_CTRL_MASK);
+#else
+	l2x0_init(IO_ADDRESS(L2_BASE_ADDR), 1 << 23, ~(1 << 23));
+#endif
 
-	l2x0_init(IO_ADDRESS(L2_BASE_ADDR), 0x0, ~0x00000000);
 	return 0;
 }
 
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 1e2c52d..27550b3 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -421,6 +421,9 @@ void l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
 		writel_relaxed(1, l2x0_base + L2X0_CTRL);
 	}
 
+	/* Re-read it in case some bits are reserved. */
+	aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
+
 	outer_cache.inv_range = l2x0_inv_range;
 	outer_cache.clean_range = l2x0_clean_range;
 	outer_cache.flush_range = l2x0_flush_range;

-- 
                                                                Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-02-24 12:12         ` Gilles Chanteperdrix
@ 2014-02-25  3:26           ` Bruno Tunes de Mello
  2014-02-25  9:27             ` Gilles Chanteperdrix
  2014-02-25 10:04             ` Gilles Chanteperdrix
  0 siblings, 2 replies; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-02-25  3:26 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,
The kernel is booting and I executed latency and xeno-test commands. The results are below.

linaro@linaro-alip:/usr/xenomai/bin$ sudo ./latency
== 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|      4.017|     10.896|     21.088|       0|     0|      4.017|     21.088
RTD|      4.507|      9.898|     24.037|       0|     0|      4.017|     24.037
RTD|      4.209|     10.840|     33.416|       0|     0|      4.017|     33.416
RTD|      3.962|     14.106|    699.722|       0|     0|      3.962|    699.722
RTD|      3.727|     12.861|    249.477|       0|     0|      3.727|    699.722
RTD|      4.032|     11.598|    317.497|       0|     0|      3.727|    699.722
RTD|      4.747|     13.290|    368.406|       0|     0|      3.727|    699.722
RTD|      8.270|     12.785|    464.007|       0|     0|      3.727|    699.722
RTD|      3.681|     11.505|    253.196|       0|     0|      3.681|    699.722
RTD|      4.047|     11.358|     23.550|       0|     0|      3.681|    699.722
RTD|      4.148|      9.409|     21.568|       0|     0|      3.681|    699.722
RTD|      3.800|     11.169|    155.095|       0|     0|      3.681|    699.722
RTD|      3.707|     12.517|    562.151|       0|     0|      3.681|    699.722
RTD|      3.979|     11.356|     21.737|       0|     0|      3.681|    699.722
RTD|      4.492|     11.813|    622.838|       0|     0|      3.681|    699.722
RTD|      3.863|      9.227|     19.388|       0|     0|      3.681|    699.722
RTD|      3.787|      7.977|    304.196|       0|     0|      3.681|    699.722
RTD|      3.818|      7.848|    488.876|       0|     0|      3.681|    699.722
RTD|      3.921|      8.030|    507.181|       0|     0|      3.681|    699.722
RTD|      3.949|      7.290|     19.797|       0|     0|      3.681|    699.722
RTD|      3.813|      9.431|     34.290|       0|     0|      3.681|    699.722
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|      3.684|     10.997|     20.499|       0|     0|      3.681|    699.722
RTD|      8.535|     11.383|     34.055|       0|     0|      3.681|    699.722
RTD|      4.429|     11.002|     30.623|       0|     0|      3.681|    699.722
RTD|      3.881|      8.739|     19.378|       0|     0|      3.681|    699.722
RTD|      3.939|      7.984|     22.012|       0|     0|      3.681|    699.722
RTD|      3.909|      7.739|     24.398|       0|     0|      3.681|    699.722
RTD|      3.893|      8.209|    278.093|       0|     0|      3.681|    699.722
RTD|      3.929|      9.452|    323.429|       0|     0|      3.681|    699.722
RTD|      4.032|     11.227|    277.406|       0|     0|      3.681|    699.722
RTD|      3.780|     12.323|    367.732|       0|     0|      3.681|    699.722
RTD|      4.085|     13.952|    639.260|       0|     0|      3.681|    699.722
RTD|      3.727|     12.202|    663.416|       0|     0|      3.681|    699.722
RTD|      4.393|     12.383|    412.757|       0|     0|      3.681|    699.722
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      3.681|     10.669|    699.722|       0|     0|    00:00:34/00:00:34

Xeno-test result:
Started child 14303: dohell 900
Started child 14304: /usr/xenomai/bin/latency
== 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|      3.790|     12.032|     20.199|       0|     0|      3.790|     20.199
RTD|      4.017|     11.207|    259.628|       0|     0|      3.790|    259.628
RTD|      3.924|     10.648|    502.863|       0|     0|      3.790|    502.863
RTD|      3.997|     11.222|    521.247|       0|     0|      3.790|    521.247
RTD|      4.002|     10.679|    167.633|       0|     0|      3.790|    521.247
RTD|      3.823|     11.035|    432.459|       0|     0|      3.790|    521.247
RTD|      3.858|     11.247|    693.482|       0|     0|      3.790|    693.482
RTD|      3.782|     10.227|    618.681|       0|     0|      3.782|    693.482
RTD|      3.977|     11.856|    614.128|       0|     0|      3.782|    693.482
RTD|      4.007|     11.287|    571.318|       0|     0|      3.782|    693.482
RTD|      3.853|     10.502|    105.585|       0|     0|      3.782|    693.482
RTD|      3.934|     10.734|    281.207|       0|     0|      3.782|    693.482
RTD|      3.845|      9.318|    187.479|       0|     0|      3.782|    693.482
RTD|      4.022|     10.353|     98.505|       0|     0|      3.782|    693.482
RTD|      3.999|     11.154|    316.641|       0|     0|      3.782|    693.482
RTD|      3.901|     10.972|    280.275|       0|     0|      3.782|    693.482
RTD|      3.818|     10.714|    601.404|       0|     0|      3.782|    693.482
RTD|      3.916|     10.729|    681.338|       0|     0|      3.782|    693.482
RTD|      4.015|     12.406|    793.967|       0|     0|      3.782|    793.967
RTD|      3.939|     11.224|    627.510|       0|     0|      3.782|    793.967
RTD|      3.863|     11.734|    520.931|       0|     0|      3.782|    793.967
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|      3.780|     10.545|    461.820|       0|     0|      3.780|    793.967
RTD|      4.032|     12.909|    743.262|       0|     0|      3.780|    793.967
RTD|      4.030|     11.906|    376.366|       0|     0|      3.780|    793.967
RTD|      4.063|     11.714|    683.219|       0|     0|      3.780|    793.967
RTD|      4.010|     12.941|    689.578|       0|     0|      3.780|    793.967
RTD|      3.972|     10.616|    414.128|       0|     0|      3.780|    793.967
RTD|      3.994|     11.643|    491.795|       0|     0|      3.780|    793.967
RTD|      3.843|     10.994|    110.843|       0|     0|      3.780|    793.967
RTD|      3.974|     11.439|    466.378|       0|     0|      3.780|    793.967
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      3.780|     11.199|    793.967|       0|     0|    00:00:30/00:00:30

Thanks for the reply,
Bruno




Em Segunda-feira, 24 de Fevereiro de 2014 9:13, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> escreveu:
 
On 02/24/2014 02:11 AM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> 
> I did the changes, but the kernel is not booting.

Ok, you are the second to report this issue, so the patch must
be touching bits it should not touch. Please try that one instead:

diff --git a/arch/arm/mach-mx6/mm.c b/arch/arm/mach-mx6/mm.c
index 3cf6b22..d89393c 100644
--- a/arch/arm/mach-mx6/mm.c
+++ b/arch/arm/mach-mx6/mm.c
@@ -97,7 +97,7 @@ void __init mx6_map_io(void)
#ifdef CONFIG_CACHE_L2X0
int mxc_init_l2x0(void)
{
-    unsigned int val;
+    unsigned int val, aux_ctrl;

    #define IOMUXC_GPR11_L2CACHE_AS_OCRAM 0x00000002

@@ -114,12 +114,28 @@ int mxc_init_l2x0(void)
    val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
    val |= 0x40800000;
    writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
+#ifndef CONFIG_IPIPE
    val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
    val |= L2X0_DYNAMIC_CLK_GATING_EN;
    val |= L2X0_STNDBY_MODE_EN;
    writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
+#endif
+
+#if 0
+    aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
+        (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
+        (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT) |
+        (1 << 23) |
+        (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
+        (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
+        (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
+        (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
+
+    l2x0_init(IO_ADDRESS(L2_BASE_ADDR), aux_ctrl, L2X0_AUX_CTRL_MASK);
+#else
+    l2x0_init(IO_ADDRESS(L2_BASE_ADDR), 1 << 23, ~(1 << 23));

+#endif

-    l2x0_init(IO_ADDRESS(L2_BASE_ADDR), 0x0, ~0x00000000);
    return 0;
}

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 1e2c52d..27550b3 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -421,6 +421,9 @@ void l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
        writel_relaxed(1, l2x0_base + L2X0_CTRL);
    }

+    /* Re-read it in case some bits are reserved. */
+    aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
+
    outer_cache.inv_range = l2x0_inv_range;
    outer_cache.clean_range = l2x0_clean_range;
    outer_cache.flush_range = l2x0_flush_range;

-- 
                                                                Gilles.

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

* Re: [Xenomai] User Space Problems
  2014-02-25  3:26           ` Bruno Tunes de Mello
@ 2014-02-25  9:27             ` Gilles Chanteperdrix
  2014-02-25 10:04             ` Gilles Chanteperdrix
  1 sibling, 0 replies; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-02-25  9:27 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 02/25/2014 04:26 AM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> The kernel is booting and I executed latency and xeno-test commands. The results are below.

Could you show us the boot logs?

-- 
                                                                Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-02-25  3:26           ` Bruno Tunes de Mello
  2014-02-25  9:27             ` Gilles Chanteperdrix
@ 2014-02-25 10:04             ` Gilles Chanteperdrix
  2014-02-25 13:35               ` Bruno Tunes de Mello
  1 sibling, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-02-25 10:04 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 02/25/2014 04:26 AM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> The kernel is booting and I executed latency and xeno-test commands. The results are below.

You also need this patch.

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index d9cb476..1e2c52d 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -41,7 +41,7 @@ static inline void cache_wait_way(void __iomem *reg, unsigned long mask)
 {
 	/* wait for cache operation by line or way to complete */
 	while (readl_relaxed(reg) & mask)
-		;
+		cpu_relax();
 }
 
 #ifdef CONFIG_CACHE_PL310
@@ -136,6 +136,7 @@ static void __l2x0_flush_all(void)
 	debug_writel(0x00);
 }
 
+#ifndef CONFIG_IPIPE
 static void l2x0_flush_all(void)
 {
 	unsigned long flags;
@@ -157,6 +158,81 @@ static void l2x0_clean_all(void)
 	cache_sync();
 	spin_unlock_irqrestore(&l2x0_lock, flags);
 }
+#else
+static void l2x0_clean_inv_line_idx(unsigned line, unsigned way)
+{
+	void __iomem *base = l2x0_base;
+
+	writel_relaxed((way << 28) | (line << 5), 
+		base + L2X0_CLEAN_INV_LINE_IDX);
+	cache_wait(base + L2X0_CLEAN_INV_LINE_IDX, 1);
+}
+
+static void l2x0_flush_way(unsigned way, unsigned len, unsigned lines)
+{
+	unsigned long flags;
+	unsigned line, i;
+	
+	for (line = 0; line < lines; line += len ) {
+		spin_lock_irqsave(&l2x0_lock, flags);
+		debug_writel(0x03);
+		for (i = 0; i < len && line + i < lines; i++)
+			l2x0_clean_inv_line_idx(line + i, way);
+		cache_sync();
+		debug_writel(0x00);
+		spin_unlock_irqrestore(&l2x0_lock, flags);
+	}
+}
+
+static void l2x0_flush_all(void)
+{
+	unsigned lines, len, way, ways;
+
+	ways = fls(l2x0_way_mask);
+	lines = l2x0_size / (ways * CACHE_LINE_SIZE);
+	len = L2X0_SPINLOCK_LEN / CACHE_LINE_SIZE;
+
+	for (way = 0; way < ways; way++)
+		l2x0_flush_way(way, len, lines);
+}
+
+static void l2x0_clean_line_idx(unsigned line, unsigned way)
+{
+	void __iomem *base = l2x0_base;
+
+	writel_relaxed((way << 28) | (line << 5), 
+		base + L2X0_CLEAN_LINE_IDX);
+	cache_wait(base + L2X0_CLEAN_LINE_IDX, 1);
+}
+
+static void l2x0_clean_way(unsigned way, unsigned len, unsigned lines)
+{
+	unsigned long flags;
+	unsigned line, i;
+	
+	for (line = 0; line < lines; line += len ) {
+		spin_lock_irqsave(&l2x0_lock, flags);
+		debug_writel(0x03);
+		for (i = 0; i < len && line + i < lines; i++)
+			l2x0_clean_line_idx(line + i, way);
+		cache_sync();
+		debug_writel(0x00);
+		spin_unlock_irqrestore(&l2x0_lock, flags);
+	}
+}
+
+static void l2x0_clean_all(void)
+{
+	unsigned lines, len, way, ways;
+
+	ways = fls(l2x0_way_mask);
+	lines = l2x0_size / (ways * CACHE_LINE_SIZE);
+	len = L2X0_SPINLOCK_LEN / CACHE_LINE_SIZE;
+
+	for (way = 0; way < ways; way++)
+		l2x0_clean_way(way, len, lines);
+}
+#endif
 
 static void l2x0_inv_all(void)
 {

-- 
                                                                Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-02-25 10:04             ` Gilles Chanteperdrix
@ 2014-02-25 13:35               ` Bruno Tunes de Mello
  2014-02-25 13:41                 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-02-25 13:35 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,

I applied this new patch and I got the results below.

This is the complete boot log: http://pastebin.com/YY5pFyaN

I executed latency and xeno-test some times and the results:

linaro@linaro-alip:/usr/xenomai/bin$ sudo ./latency
== 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|      4.904|      9.997|     26.108|       0|     0|      4.904|     26.108
RTD|      4.669|      9.931|     25.295|       0|     0|      4.669|     26.108
RTD|      4.709|     10.035|     25.694|       0|     0|      4.669|     26.108
RTD|      3.893|     10.383|     41.742|       0|     0|      3.893|     41.742
RTD|      4.598|      9.618|     49.883|       0|     0|      3.893|     49.883
RTD|      4.823|      9.820|     31.297|       0|     0|      3.893|     49.883
RTD|      4.282|      9.603|     23.123|       0|     0|      3.893|     49.883
RTD|      4.343|      9.583|     33.345|       0|     0|      3.893|     49.883
RTD|      4.267|     11.138|     36.436|       0|     0|      3.893|     49.883
RTD|      4.919|     10.891|     22.083|       0|     0|      3.893|     49.883
RTD|      4.414|      9.752|     34.035|       0|     0|      3.893|     49.883
RTD|      4.535|      9.765|     35.512|       0|     0|      3.893|     49.883
RTD|      4.113|      9.851|     39.275|       0|     0|      3.893|     49.883
RTD|      3.944|     10.613|     31.088|       0|     0|      3.893|     49.883
RTD|      9.593|     12.545|     37.883|       0|     0|      3.893|     49.883
RTD|      9.479|     12.603|     44.626|       0|     0|      3.893|     49.883
RTD|      9.060|     12.689|     43.363|       0|     0|      3.893|     49.883
RTD|      4.494|     10.919|     42.674|       0|     0|      3.893|     49.883
RTD|      4.709|     10.540|     37.252|       0|     0|      3.893|     49.883
RTD|      4.191|      9.179|     22.212|       0|     0|      3.893|     49.883
RTD|      4.969|     11.126|     24.075|       0|     0|      3.893|     49.883
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|      4.494|     12.487|     28.108|       0|     0|      3.893|     49.883
RTD|      4.156|     11.126|     21.053|       0|     0|      3.893|     49.883
RTD|      4.462|     11.654|     39.888|       0|     0|      3.893|     49.883
RTD|      5.510|     12.931|     41.967|       0|     0|      3.893|     49.883
RTD|      4.282|     12.989|     43.045|       0|     0|      3.893|     49.883
RTD|      3.792|     12.520|     37.727|       0|     0|      3.792|     49.883
RTD|      4.459|     13.199|     36.714|       0|     0|      3.792|     49.883
RTD|      4.494|     11.055|     51.909|       0|     0|      3.792|     51.909
RTD|      4.530|      9.979|     48.623|       0|     0|      3.792|     51.909
RTD|      4.224|      9.325|     42.828|       0|     0|      3.792|     51.909
RTD|      3.891|      9.176|     54.623|       0|     0|      3.792|     54.623
RTD|      4.472|     12.499|     33.911|       0|     0|      3.792|     54.623
RTD|      6.810|     13.015|     45.351|       0|     0|      3.792|     54.623
RTD|      4.936|     13.906|     49.749|       0|     0|      3.792|     54.623
RTD|      4.732|     15.356|     52.207|       0|     0|      3.792|     54.623
RTD|      5.608|     12.479|     49.457|       0|     0|      3.792|     54.623
RTD|      6.348|     13.356|     39.015|       0|     0|      3.792|     54.623
RTD|      8.702|     13.520|     40.843|       0|     0|      3.792|     54.623
RTD|      6.898|     12.949|     42.744|       0|     0|      3.792|     54.623
RTD|      4.222|     12.335|     39.363|       0|     0|      3.792|     54.623
RTD|      3.891|     12.383|     35.325|       0|     0|      3.792|     54.623
RTT|  00:00:43  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      8.116|     13.333|     38.209|       0|     0|      3.792|     54.623
RTD|      8.510|     13.126|     40.661|       0|     0|      3.792|     54.623
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      3.792|     11.482|     54.623|       0|     0|    00:00:45/00:00:45


(Xeno-test)

Started child 27013: dohell 900
Started child 27015: /usr/xenomai/bin/latency
== 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|      4.065|     10.621|     21.959|       0|     0|      4.065|     21.959
RTD|      3.952|     11.335|     46.752|       0|     0|      3.952|     46.752
RTD|      4.050|     11.121|     49.285|       0|     0|      3.952|     49.285
RTD|      4.088|     11.131|     41.467|       0|     0|      3.952|     49.285
RTD|      4.065|     10.851|     58.446|       0|     0|      3.952|     58.446
RTD|      4.027|     10.949|     43.684|       0|     0|      3.952|     58.446
RTD|      4.027|     10.366|     35.911|       0|     0|      3.952|     58.446
RTD|      3.982|     10.292|     32.992|       0|     0|      3.952|     58.446
RTD|      4.012|     10.126|     43.656|       0|     0|      3.952|     58.446
RTD|      3.795|      9.898|     35.883|       0|     0|      3.795|     58.446
RTD|      4.300|     10.257|     25.505|       0|     0|      3.795|     58.446
RTD|      4.520|     10.345|     30.060|       0|     0|      3.795|     58.446
RTD|      4.436|     10.449|     29.542|       0|     0|      3.795|     58.446
RTD|      4.696|     10.416|     31.156|       0|     0|      3.795|     58.446
RTD|      3.717|      9.555|     28.782|       0|     0|      3.717|     58.446
RTD|      3.699|      8.686|     26.416|       0|     0|      3.699|     58.446
RTD|      3.709|      9.133|     28.300|       0|     0|      3.699|     58.446
RTD|      3.770|      8.661|     21.747|       0|     0|      3.699|     58.446
RTD|      4.070|      8.702|     24.411|       0|     0|      3.699|     58.446
RTD|      3.999|      9.570|     26.651|       0|     0|      3.699|     58.446
RTD|      4.012|      9.762|     23.934|       0|     0|      3.699|     58.446
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|      4.045|     10.755|     25.207|       0|     0|      3.699|     58.446
RTD|      3.881|     10.616|     35.510|       0|     0|      3.699|     58.446
RTD|      3.957|     10.166|     33.967|       0|     0|      3.699|     58.446
RTD|      4.098|      8.474|     31.830|       0|     0|      3.699|     58.446
RTD|      3.893|     10.047|     40.204|       0|     0|      3.699|     58.446
RTD|      4.123|     10.962|     28.047|       0|     0|      3.699|     58.446
RTD|      4.063|     10.568|     30.244|       0|     0|      3.699|     58.446
RTD|      3.972|     10.252|     32.785|       0|     0|      3.699|     58.446
RTD|      4.012|      8.707|     24.633|       0|     0|      3.699|     58.446
RTD|      4.085|     10.229|     25.648|       0|     0|      3.699|     58.446
RTD|      3.957|     10.179|     25.866|       0|     0|      3.699|     58.446
RTD|      4.042|     10.191|     25.489|       0|     0|      3.699|     58.446
RTD|      4.093|     10.560|     25.578|       0|     0|      3.699|     58.446
RTD|      4.053|     10.838|     34.282|       0|     0|      3.699|     58.446
RTD|      3.959|     10.409|     26.353|       0|     0|      3.699|     58.446
RTD|      4.050|     10.396|     30.277|       0|     0|      3.699|     58.446
RTD|      4.065|      9.603|     27.381|       0|     0|      3.699|     58.446
RTD|      3.949|     10.090|     31.560|       0|     0|      3.699|     58.446
RTD|      4.073|     10.242|     24.941|       0|     0|      3.699|     58.446
RTD|      4.083|      9.204|     25.424|       0|     0|      3.699|     58.446
RTD|      4.103|      9.017|     38.196|       0|     0|      3.699|     58.446
RTT|  00:00:43  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      4.068|      9.702|     29.547|       0|     0|      3.699|     58.446
RTD|      3.979|     10.494|     25.823|       0|     0|      3.699|     58.446
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      3.699|     10.088|     58.446|       0|     0|    00:00:44/00:00:44

Thanks,
Bruno





Em Terça-feira, 25 de Fevereiro de 2014 7:04, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> escreveu:
 
On 02/25/2014 04:26 AM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> The kernel is booting and I executed latency and xeno-test commands. The results are below.

You also need this patch.

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index d9cb476..1e2c52d 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -41,7 +41,7 @@ static inline void cache_wait_way(void __iomem *reg, unsigned long mask)
{
    /* wait for cache operation by line or way to complete */
    while (readl_relaxed(reg) & mask)
-        ;
+        cpu_relax();
}

#ifdef CONFIG_CACHE_PL310
@@ -136,6 +136,7 @@ static void __l2x0_flush_all(void)
    debug_writel(0x00);
}

+#ifndef CONFIG_IPIPE
static void l2x0_flush_all(void)
{
    unsigned long flags;
@@ -157,6 +158,81 @@ static void l2x0_clean_all(void)
    cache_sync();
    spin_unlock_irqrestore(&l2x0_lock, flags);
}
+#else
+static void l2x0_clean_inv_line_idx(unsigned line, unsigned way)
+{
+    void __iomem *base = l2x0_base;
+
+    writel_relaxed((way << 28) | (line << 5), 
+        base + L2X0_CLEAN_INV_LINE_IDX);
+    cache_wait(base + L2X0_CLEAN_INV_LINE_IDX, 1);
+}
+
+static void l2x0_flush_way(unsigned way, unsigned len, unsigned lines)
+{
+    unsigned long flags;
+    unsigned line, i;
+    
+    for (line = 0; line < lines; line += len ) {
+        spin_lock_irqsave(&l2x0_lock, flags);
+        debug_writel(0x03);
+        for (i = 0; i < len && line + i < lines; i++)
+            l2x0_clean_inv_line_idx(line + i, way);
+        cache_sync();
+        debug_writel(0x00);
+        spin_unlock_irqrestore(&l2x0_lock, flags);
+    }
+}
+
+static void l2x0_flush_all(void)
+{
+    unsigned lines, len, way, ways;
+
+    ways = fls(l2x0_way_mask);
+    lines = l2x0_size / (ways * CACHE_LINE_SIZE);
+    len = L2X0_SPINLOCK_LEN / CACHE_LINE_SIZE;
+
+    for (way = 0; way < ways; way++)
+        l2x0_flush_way(way, len, lines);
+}
+
+static void l2x0_clean_line_idx(unsigned line, unsigned way)
+{
+    void __iomem *base = l2x0_base;
+
+    writel_relaxed((way << 28) | (line << 5), 
+        base + L2X0_CLEAN_LINE_IDX);
+    cache_wait(base + L2X0_CLEAN_LINE_IDX, 1);
+}
+
+static void l2x0_clean_way(unsigned way, unsigned len, unsigned lines)
+{
+    unsigned long flags;
+    unsigned line, i;
+    
+    for (line = 0; line < lines; line += len ) {
+        spin_lock_irqsave(&l2x0_lock, flags);
+        debug_writel(0x03);
+        for (i = 0; i < len && line + i < lines; i++)
+            l2x0_clean_line_idx(line + i, way);
+        cache_sync();
+        debug_writel(0x00);
+        spin_unlock_irqrestore(&l2x0_lock, flags);
+    }
+}
+
+static void l2x0_clean_all(void)
+{
+    unsigned lines, len, way, ways;
+
+    ways = fls(l2x0_way_mask);
+    lines = l2x0_size / (ways * CACHE_LINE_SIZE);
+    len = L2X0_SPINLOCK_LEN / CACHE_LINE_SIZE;
+
+    for (way = 0; way < ways; way++)
+        l2x0_clean_way(way, len, lines);
+}
+#endif

static void l2x0_inv_all(void)

{

-- 
                                                                Gilles.

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

* Re: [Xenomai] User Space Problems
  2014-02-25 13:35               ` Bruno Tunes de Mello
@ 2014-02-25 13:41                 ` Gilles Chanteperdrix
  2014-03-03 18:32                   ` Bruno Tunes de Mello
  0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-02-25 13:41 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 02/25/2014 02:35 PM, Bruno Tunes de Mello wrote:
> Hi Gilles,
>
> I applied this new patch and I got the results below.
>
> This is the complete boot log: http://pastebin.com/YY5pFyaN

Ok, bit 23 seems enabled in the L2 cache auxiliary register, which is 
what I wanted to see.

>
> I executed latency and xeno-test some times and the results:

This looks much better, you should let the test run longer, and if 
possible using dohell with LTP to generate load during that time.

-- 
					    Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-02-25 13:41                 ` Gilles Chanteperdrix
@ 2014-03-03 18:32                   ` Bruno Tunes de Mello
  2014-03-03 18:45                     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-03-03 18:32 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,

I did the tests you said to verify the system's behavior with load .

I executed some tests using commands 'stress', cpuburn for Cortex A8 and dohell with LTP, for more than 20 minutes each one.
I printed 3 results using some of these tools together: http://pastebin.com/VFavnaxW
In each test it's indicated the commands used to generate load.

It's just to confirm if it's all right.

Thanks,
Bruno





Em Terça-feira, 25 de Fevereiro de 2014 10:41, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> escreveu:
 
On 02/25/2014 02:35 PM, Bruno Tunes de Mello wrote:
> Hi Gilles,
>
> I applied this new patch and I got the results below.
>
> This is the complete boot log: http://pastebin.com/YY5pFyaN

Ok, bit 23 seems enabled in the L2 cache auxiliary register, which is 
what I wanted to see.

>
> I executed latency and xeno-test some times and the results:

This looks much better, you should let the test run longer, and if 
possible using dohell with LTP to generate load during that time.


-- 
                        Gilles.

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

* Re: [Xenomai] User Space Problems
  2014-03-03 18:32                   ` Bruno Tunes de Mello
@ 2014-03-03 18:45                     ` Gilles Chanteperdrix
  2014-03-04  3:47                       ` Bruno Tunes de Mello
  0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-03 18:45 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 03/03/2014 07:32 PM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> 
> I did the tests you said to verify the system's behavior with load .
> 
> I executed some tests using commands 'stress', cpuburn for Cortex A8 and dohell with LTP, for more than 20 minutes each one.
> I printed 3 results using some of these tools together: http://pastebin.com/VFavnaxW
> In each test it's indicated the commands used to generate load.
> 
> It's just to confirm if it's all right.

71us may be a bit high, but have you run xeno-test and latency at the 
same time? xeno-test runs latency, so, if you also run the latency test 
separately, one latency test will perturb the results of the other.

Also, something I noted on omap4, I have no explanation, but it seems 
latency is better on cpu 0, also, running dohell with all the options 
should provide a harder load.

I use:
xeno-test -l "dohell -s 192.168.0.5 -m /mnt -l /ltp" -c 0 -p 100 -g histo

Where 192.168.0.5 has the "discard" service enabled in inetd.conf (the 
discard service is not enabled by default).

And an USB key is mounted on /mnt.

The generated "histo" files can be used with scripts/histo.gp to generate
histograms like:
http://sisyphus.hd.free.fr/~gilles/core-3.10-latencies/panda.png

Note that since the feedback from mx6 users about the L2 "write-allocate" 
bit, the panda board latency dropped down to about 25us.

-- 
                                                                Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-03-03 18:45                     ` Gilles Chanteperdrix
@ 2014-03-04  3:47                       ` Bruno Tunes de Mello
  2014-03-04 15:11                         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-03-04  3:47 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,

You are right, in the first test, I executed both latency and xeno-test commands. Sorry.
The others test I executed only latency command.

I tried to enable the discard service on /etc/inetd.conf, I don't know if I did it right, but in /etc/services file I found 'discard 9/tcp sink null' and 'discard 9/udp sink null'.
Then I used the command you said:
xeno-test -l "dohell -s 192.168.0.5 -m /media/linaro/PENDRIVE -l /opt/ltp" -c 0 -p 100 -g histo

I tested a few times and the better result is: http://pt-br.tinypic.com/r/206mmvn/8
This result is not so good like that you showed.

My doubt is if this result is satisfactory (the platform is ready for develop applications) or do you think that I need to do some correction?

Thanks, 
Bruno





Em Segunda-feira, 3 de Março de 2014 15:45, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> escreveu:
 
On 03/03/2014 07:32 PM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> 
> I did the tests you said to verify the system's behavior with load .
> 
> I executed some tests using commands 'stress', cpuburn for Cortex A8 and dohell with LTP, for more than 20 minutes each one.
> I printed 3 results using some of these tools together: http://pastebin.com/VFavnaxW
> In each test it's indicated the commands used to generate load.
> 
> It's just to confirm if it's all right.

71us may be a bit high, but have you run xeno-test and latency at the 
same time? xeno-test runs latency, so, if you also run the latency test 
separately, one latency test will perturb the results of the other.

Also, something I noted on omap4, I have no explanation, but it seems 
latency is better on cpu 0, also, running dohell with all the options 
should provide a harder load.

I use:
xeno-test -l "dohell -s 192.168.0.5 -m /mnt -l /ltp" -c 0 -p 100 -g histo

Where 192.168.0.5 has the "discard" service enabled in inetd.conf (the 
discard service is not enabled by default).

And an USB key is mounted on /mnt.

The generated "histo" files can be used with scripts/histo.gp to generate
histograms like:
http://sisyphus.hd.free.fr/~gilles/core-3.10-latencies/panda.png

Note that since the feedback from mx6 users about the L2 "write-allocate" 
bit, the panda board latency dropped down to about 25us.


-- 
                                                                Gilles.

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

* Re: [Xenomai] User Space Problems
  2014-03-04  3:47                       ` Bruno Tunes de Mello
@ 2014-03-04 15:11                         ` Gilles Chanteperdrix
  2014-03-11  0:51                           ` Bruno Tunes de Mello
  0 siblings, 1 reply; 16+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-04 15:11 UTC (permalink / raw)
  To: Bruno Tunes de Mello; +Cc: xenomai

On 03/04/2014 04:47 AM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> 
> You are right, in the first test, I executed both latency and xeno-test commands. Sorry.
> The others test I executed only latency command.
> 
> I tried to enable the discard service on /etc/inetd.conf, I don't know if I did it right, but in /etc/services file I found 'discard 9/tcp sink null' and 'discard 9/udp sink null'.
> Then I used the command you said:
> xeno-test -l "dohell -s 192.168.0.5 -m /media/linaro/PENDRIVE -l /opt/ltp" -c 0 -p 100 -g histo
> 
> I tested a few times and the better result is: http://pt-br.tinypic.com/r/206mmvn/8
> This result is not so good like that you showed.
> 
> My doubt is if this result is satisfactory (the platform is ready for develop applications) or do you think that I need to do some correction?

70us is a bit high, but on the other hand:
- the mx6q is a quad-core, whereas the omap4 is a dual core, the latency
increases with the number of cores;
- the tests I make on omap4 do not use much of the processor
peripherals, such as the graphic co-processor, so, if you use the
graphic co-processor, you may observe an increase in latencies as well.

Finally, whether this is satisfactory depends on your application.

The only way to improve latency is to enable the I-pipe tracer, and try
and understand where the maximum latency come from, but this is time
consuming.

Also, some settings are known to result in an improvement in latencies:
- turn off CONFIG_PREEMPT (i.e. enable CONFIG_PREEMPT_NONE), this looks
contradictory, as the menu entry says "low latency", but it is talking
about Linux latencies, not Xenomai's
- build kernel and user-space in thumb2
- disable Xenomai unlocked context switch

But do not expect these settings to reduce the latency by more than say 5us.


-- 
                                                                Gilles.


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

* Re: [Xenomai] User Space Problems
  2014-03-04 15:11                         ` Gilles Chanteperdrix
@ 2014-03-11  0:51                           ` Bruno Tunes de Mello
  0 siblings, 0 replies; 16+ messages in thread
From: Bruno Tunes de Mello @ 2014-03-11  0:51 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hi Gilles,

I understand. I have a beaglebone too and as soon as possible I will make some test on it.

Thank you for all help and attention,
Bruno





Em Terça-feira, 4 de Março de 2014 12:13, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> escreveu:
 
On 03/04/2014 04:47 AM, Bruno Tunes de Mello wrote:
> Hi Gilles,
> 
> You are right, in the first test, I executed both latency and xeno-test commands. Sorry.
> The others test I executed only latency command.
> 
> I tried to enable the discard service on /etc/inetd.conf, I don't know if I did it right, but in /etc/services file I found 'discard 9/tcp sink null' and 'discard 9/udp sink null'.
> Then I used the command you said:
> xeno-test -l "dohell -s 192.168.0.5 -m /media/linaro/PENDRIVE -l /opt/ltp" -c 0 -p 100 -g histo
> 
> I tested a few times and the better result is: http://pt-br.tinypic.com/r/206mmvn/8
> This result is not so good like that you showed.
> 
> My doubt is if this result is satisfactory (the platform is ready for develop applications) or do you think that I need to do some correction?

70us is a bit high, but on the other hand:
- the mx6q is a quad-core, whereas the omap4 is a dual core, the latency
increases with the number of cores;
- the tests I make on omap4 do not use much of the processor
peripherals, such as the graphic co-processor, so, if you use the
graphic co-processor, you may observe an increase in latencies as well.

Finally, whether this is satisfactory depends on your application.

The only way to improve latency is to enable the I-pipe tracer, and try
and understand where the maximum latency come from, but this is time
consuming.

Also, some settings are known to result in an improvement in latencies:
- turn off CONFIG_PREEMPT (i.e. enable CONFIG_PREEMPT_NONE), this looks
contradictory, as the menu entry says "low latency", but it is talking
about Linux latencies, not Xenomai's
- build kernel and user-space in thumb2
- disable Xenomai unlocked context switch

But do not expect these settings to reduce the latency by more than say 5us.



-- 
                                                                Gilles.

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

end of thread, other threads:[~2014-03-11  0:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21 14:31 [Xenomai] User Space Problems Bruno Tunes de Mello
2014-02-21 14:46 ` Gilles Chanteperdrix
2014-02-23 23:32   ` Bruno Tunes de Mello
2014-02-23 23:37     ` Gilles Chanteperdrix
2014-02-24  1:11       ` Bruno Tunes de Mello
2014-02-24 12:12         ` Gilles Chanteperdrix
2014-02-25  3:26           ` Bruno Tunes de Mello
2014-02-25  9:27             ` Gilles Chanteperdrix
2014-02-25 10:04             ` Gilles Chanteperdrix
2014-02-25 13:35               ` Bruno Tunes de Mello
2014-02-25 13:41                 ` Gilles Chanteperdrix
2014-03-03 18:32                   ` Bruno Tunes de Mello
2014-03-03 18:45                     ` Gilles Chanteperdrix
2014-03-04  3:47                       ` Bruno Tunes de Mello
2014-03-04 15:11                         ` Gilles Chanteperdrix
2014-03-11  0:51                           ` Bruno Tunes de Mello

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.