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 <[email protected]> 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. _______________________________________________ Xenomai mailing list [email protected] http://www.xenomai.org/mailman/listinfo/xenomai
