All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Lukasz Zemla <Lukasz.Zemla@woodward.com>
Cc: "Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: [Xenomai] Xenomai installation on P1020RDB
Date: Fri, 20 Jul 2012 20:25:22 +0200	[thread overview]
Message-ID: <5009A292.4060508@grandegger.com> (raw)
In-Reply-To: <CE2E43470FE5444A811B580382FE5EDF2113D8D95A@KEMPMAIL2.woodward.com>

Hi Lukasz,

On 07/20/2012 04:31 PM, Lukasz Zemla wrote:
> Hello,
> 
> Has anyone some experience with installing Xenomai on P1020RDB board? I'd like to perform some benchmarks on this board.
> I'm trying to install it using the latest Freescale SDK 1.2 based on Yocto. But hints for SDK 1.0.3 would be also fine. Finally every way for getting it working... ;-)
> 
> What I'm doing is getting Freescale kernel (3.0.34):

If you can, use a *mainline* kernel. The latest Xenomai patch is for
Linux 3.2.21 and that version does well support the P1020RDB, IIRC.

>                bitbake -c unpack virtual/kernel
> and then trying manually to run prepare-kernel.sh pointing to directory where sources where unpacked. I tried all i-pipe 3.x patches - but all of them returned error.
> 
> Is it true that i-pipe can be applied _only_ to the _vanilla_ kernel with version which _exactly_ matches i-pipe patch version?

If you are lucky it will apply to other (rather close) versions as
well, but it is no surprise if it fails. 

> Next I tried to install Xenomai on vanilla 3.1.10 kernel. I got compilation error:
> 
>         arch/powerpc/sysdev/fsl_lbc.c: In function 'fsl_lbc_ctrl_irq':
>         arch/powerpc/sysdev/fsl_lbc.c:247:3: error: 'TASK_NORMAL' undeclared (first use in this function)

That has nothing to do with Xenomai. Did you try to build the vanilla
kernel first?

> I fixed it by adding '#include <linux/sched.h>' in arch/powerpc/sysdev/fsl_lbc.c file. After successful build the kernel hung just after loading DTB.
> 
> 
> 
> Filename 'p1020rdb-pc.dtb'.
> 
> Load address: 0xc00000
> 
> Loading: ###
> 
> done
> 
> Bytes transferred = 12888 (3258 hex)
> 
> WARNING: adjusting available memory to 30000000
> 
> ## Booting kernel from Legacy Image at 01000000 ...
> 
>    Image Name:   Linux-3.1.10
> 
>    Created:      2012-07-20  13:54:54 UTC
> 
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
> 
>    Data Size:    3757211 Bytes = 3.6 MiB
> 
>    Load Address: 00000000
> 
>    Entry Point:  00000000
> 
>    Verifying Checksum ... OK
> 
> ## Loading init Ramdisk from Legacy Image at 02000000 ...
> 
>    Image Name:   fsl-image-minimal-ww-p1020rdb-20
> 
>    Created:      2012-07-18   9:30:13 UTC
> 
>    Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
> 
>    Data Size:    4596585 Bytes = 4.4 MiB
> 
>    Load Address: 00000000
> 
>    Entry Point:  00000000
> 
>    Verifying Checksum ... OK
> 
> ## Flattened Device Tree blob at 00c00000
> 
>    Booting using the fdt blob at 0xc00000
> 
>    Uncompressing Kernel Image ... OK
> 
>    Loading Ramdisk to 2fb9d000, end 2ffff369 ... OK
> 
>    Loading Device Tree to 00ff9000, end 00fff257 ... OK

This is also not related to Xenomai. Did you set the console properly?
You may be able to list the kernel log buffer after a soft-reset at
address "grep __log_buf System.map | cut -d" " -f1" - 0xc0000000
using the U-Boot command "md".

I tested Xenomai recently on a P2020 with mainline Linux 3.2.x with the
new iPipe-Patch and got very good latency results, especially with CPU
isolation: 65 us without and *8* us with CPU isolation. [I'm still puzzled
about the good results with CPU isolation. Maybe that's due to the new
iPipe-Patch. Need to re-test when time permits). I have listed the results
below.

Hope this info is useful.

Wolfgang.


Latency-Test *without* CPU isolation:
=====================================

- After 4 hours and concurrent load generation via

  # while sleep 5; do ./hackbench 50; done
  # while true; do ./calibrator 1200 256M calib.dat; done

in two separate ssh sessions I got:

  RTT|  04:15:31  (periodic user-mode task, 10000 us period, priority 99)
  RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
  RTD|     16.360|     20.640|     29.146|       0|     0|      0.666|     65.986
  RTD|     16.733|     21.093|     27.333|       0|     0|      0.666|     65.986
  ...
  ^C
  ---|-----------|-----------|-----------|--------|------|-------------------------
  RTS|      0.666|     14.493|     65.986|       0|     0|    04:15:43/04:15:43


Latency-Test *with* CPU isolation:
==================================

- Boot Linux with bootargs "isolcpus=1".

- Set smp_affinity for all interrupts:

  # echo 1 > /proc/irq/default_smp_affinity
  # for f in `ls /proc/irq/[0-9]*/smp_affinity`; do echo 1 > $f; done

- Generate load in two separate ssh sessions:

  # while sleep 5; do ./hackbench 50; done
  # while true; do ./calibrator 1200 256M calib.dat; done

- Run latency test on the second CPU:

  # cat /proc/xenomai/latency
  1986
  # latency -p10000 -c1
  ...
  RTT|  04:13:46  (periodic user-mode task, 10000 us period, priority 99)
  RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
  RTD|      0.946|      1.546|      2.280|       0|     0|      0.466|      7.386
  RTD|      1.013|      1.746|      3.053|       0|     0|      0.466|      7.386
  ...
  ^C
  ---|-----------|-----------|-----------|--------|------|-------------------------
  RTS|      0.466|      1.480|      7.386|       0|     0|    04:13:50/04:13:50





  reply	other threads:[~2012-07-20 18:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 14:31 [Xenomai] Xenomai installation on P1020RDB Lukasz Zemla
2012-07-20 18:25 ` Wolfgang Grandegger [this message]
2012-07-23  8:48   ` Richard Cochran
2012-07-23 12:01     ` Wolfgang Grandegger
2012-07-25 16:18   ` Lukasz Zemla
2012-07-25 17:11     ` Gilles Chanteperdrix
2012-07-25 17:36       ` Gilles Chanteperdrix
2012-07-25 20:15         ` Lukasz Zemla
2012-07-25 20:42           ` Gilles Chanteperdrix
2012-07-26 11:20             ` Lukasz Zemla
2012-07-26 12:00               ` Gilles Chanteperdrix
2012-07-27 15:53                 ` Lukasz Zemla
2012-07-27 16:00                   ` Gilles Chanteperdrix
2012-07-27 16:08                     ` Philippe Gerum
2012-07-27 16:12                       ` Lukasz Zemla
2012-07-27 16:19                         ` Philippe Gerum
2012-07-29 14:30                           ` Philippe Gerum
2012-07-29 14:10         ` Philippe Gerum
2012-07-25 19:26     ` Wolfgang Grandegger
2012-07-25 20:26       ` Lukasz Zemla
2012-07-25 20:55         ` Wolfgang Grandegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5009A292.4060508@grandegger.com \
    --to=wg@grandegger.com \
    --cc=Lukasz.Zemla@woodward.com \
    --cc=Xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.