Skip to contentSkip to conversation

Xenomai port to SH4

Xenomai-help Kiichi Kameda 3 participants 6 messages Apr 17, 2006 – Apr 19, 2006

lore
Share & tools
lore
#1 lore raw
In reply to Kiichi Kameda
Quoted 101 lines · Kiichi Kameda

I have been porting Xenomai-2.0.2 to SH(SuperH) architecture. Currently almost all functions work well. And, I am mesuring the performance from user-space program using posix skin on a 240MHz SH7750R(SH4) machine, mainly 1 ms periodic dispatch latency. The measured data shows small latency(tens of micro seconds) when system has a light workload. In case of heavy workload such as frequent linux command input, the latency increases to some 200 micro seconds, though.

Following is the testsuit/latency/latency program(using native skin - slightly modified) output with comment.
In case of posix skin, the data shows similar tendency.

RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
...(no workload)
RTD| 333| 1400| 9733| 0| 333|
27066
RTD| 333| 1466| 34533| 0| 333|
34533
RTD| 266| 1400| 14533| 0| 266|
34533
RTD| 400| 1400| 14466| 0| 266|
34533
RTD| 333| 1333| 7533| 0| 266|
34533
RTD| 266| 1400| 14333| 0| 266|
34533
RTD| 333| 1400| 40866| 0| 266|
40866
RTD| 333| 1466| 25533| 0| 266|
40866
RTD| 266| 1400| 14400| 0| 266|
40866
RTD| 400| 1400| 13600| 0| 266|
40866
RTD| 266| 1400| 7466| 0| 266|
40866
RTD| 333| 1466| 40800| 0| 266|
40866
RTD| 333| 1400| 18466| 0| 266|
40866
RTD| 333| 1400| 13533| 0| 266|
40866
...
RTD| 333| 1333| 7133| 0| 266|
40866
(telnet login)
RTD| 266| 4400| 111000| 0| 266|
111000
RTD| 333| 1400| 27266| 0| 266|
111000
RTD| 333| 1466| 28000| 0| 266|
111000

RTD| 333| 1466| 33133| 0| 266|
111000
RTD| 333| 1466| 26800| 0| 266|
111000
(single ps aux command)
RTD| 333| 22800| 112533| 0| 266|
112533
RTD| 333| 1400| 19400| 0| 266|
112533
RTD| 266| 1466| 35000| 0| 266|
112533
RTD| 333| 1400| 7533| 0| 266|
112533
RTD| 333| 1400| 15733| 0| 266|
112533
RTD| 266| 1866| 71333| 0| 266|
112533
RTD| 333| 9866| 105866| 0| 266|
112533
RTD| 266| 1400| 14400| 0| 266|
112533

RTD| 266| 1400| 11266| 0| 266|
112533
RTD| 400| 1466| 50133| 0| 266|
112533
RTD| 333| 3066| 116866| 0| 266|
116866
(successive ps aux command)
RTD| 1266| 15933| 218866| 0| 266|
218866
RTD| 1266| 2400| 76666| 0| 266|
218866
RTD| 333| 1400| 15000| 0| 266|
218866
RTD| 266| 1400| 27600| 0| 266|
218866
RTD| 400| 1400| 15333| 0| 266|
218866
RTD| 266| 1333| 6933| 0| 266|
218866
RTD| 333| 1400| 16533| 0| 266|
218866
RTD| 400| 1800| 75933| 0| 266|
218866

Quoted 4 lines

It is enough possible I have misported the Xenomai to SH, but I also think Xenomai user-space program(primary mode) suffers such extra latency when Linux kernel runs Linux programs.

Likely cache management issues.

Quoted 2 lines

I will appreciate any suggestion for latency improvement.

Any code to share with us, Adeos/sh4 for instance?

Quoted 10 lines

Thank you,

Kiichi Kameda

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.
#4 lore raw
In reply to Kiichi Kameda
Quoted 1 line · Kiichi Kameda

I have been porting Xenomai-2.0.2 to SH(SuperH) architecture.

Cool!

Quoted 6 lines

Currently almost all functions work well. And, I am mesuring the performance from user-space program using posix skin on a 240MHz SH7750R(SH4) machine, mainly 1 ms periodic dispatch latency. The measured data shows small latency(tens of micro seconds) when system has a light workload. In case of heavy workload such as frequent linux command input, the latency increases to some 200 micro seconds, though.

If you are looking for real heavy load: cache benchmarks tend to stress your system most (e.g. http://www.cwi.nl/~manegold/Calibrator). Combine them with heavy i/o load (flood ping etc.).

Anyway, 200 us for a 240 MHz system doesn't sound totally unrealistic. But I do not know the sh4 architecture to give a reliable estimation.

What are your numbers when running latency in the other modes, i.e. without the need to switch to user space (mode 1, "-t1") or even without any context switch at all (mode 2, "-t2")?

Quoted 94 lines

Following is the testsuit/latency/latency program(using native skin - slightly modified) output with comment.
In case of posix skin, the data shows similar tendency.

RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
...(no workload)
RTD| 333| 1400| 9733| 0| 333|
27066
RTD| 333| 1466| 34533| 0| 333|
34533
RTD| 266| 1400| 14533| 0| 266|
34533
RTD| 400| 1400| 14466| 0| 266|
34533
RTD| 333| 1333| 7533| 0| 266|
34533
RTD| 266| 1400| 14333| 0| 266|
34533
RTD| 333| 1400| 40866| 0| 266|
40866
RTD| 333| 1466| 25533| 0| 266|
40866
RTD| 266| 1400| 14400| 0| 266|
40866
RTD| 400| 1400| 13600| 0| 266|
40866
RTD| 266| 1400| 7466| 0| 266|
40866
RTD| 333| 1466| 40800| 0| 266|
40866
RTD| 333| 1400| 18466| 0| 266|
40866
RTD| 333| 1400| 13533| 0| 266|
40866
...
RTD| 333| 1333| 7133| 0| 266|
40866
(telnet login)
RTD| 266| 4400| 111000| 0| 266|
111000
RTD| 333| 1400| 27266| 0| 266|
111000
RTD| 333| 1466| 28000| 0| 266|
111000

RTD| 333| 1466| 33133| 0| 266|
111000
RTD| 333| 1466| 26800| 0| 266|
111000
(single ps aux command)
RTD| 333| 22800| 112533| 0| 266|
112533
RTD| 333| 1400| 19400| 0| 266|
112533
RTD| 266| 1466| 35000| 0| 266|
112533
RTD| 333| 1400| 7533| 0| 266|
112533
RTD| 333| 1400| 15733| 0| 266|
112533
RTD| 266| 1866| 71333| 0| 266|
112533
RTD| 333| 9866| 105866| 0| 266|
112533
RTD| 266| 1400| 14400| 0| 266|
112533

RTD| 266| 1400| 11266| 0| 266|
112533
RTD| 400| 1466| 50133| 0| 266|
112533
RTD| 333| 3066| 116866| 0| 266|
116866
(successive ps aux command)
RTD| 1266| 15933| 218866| 0| 266|
218866
RTD| 1266| 2400| 76666| 0| 266|
218866
RTD| 333| 1400| 15000| 0| 266|
218866
RTD| 266| 1400| 27600| 0| 266|
218866
RTD| 400| 1400| 15333| 0| 266|
218866
RTD| 266| 1333| 6933| 0| 266|
218866
RTD| 333| 1400| 16533| 0| 266|
218866
RTD| 400| 1800| 75933| 0| 266|
218866

Quoted 5 lines

It is enough possible I have misported the Xenomai to SH, but I also think Xenomai user-space program(primary mode) suffers such extra latency when Linux kernel runs Linux programs.

I will appreciate any suggestion for latency improvement.

Very helpful for understanding what happens on your system is the ipipe latency tracer. We have support for x86 and ppc so far, and there are "templates" for porting it to other archs available from Ingo Molnar's original patch. Unfortunately, even the latter does not yet include sh4 support, so porting it would be a real pioneer work. :)

But, basically, it can be as simple as writing an mcount stub in assembly to call the actual tracing function. See x86 on this.

Jan

#3 lore raw
In reply to Kiichi Kameda
Quoted 5 lines · Kiichi Kameda
Quoted 2 lines

Any code to share with us, Adeos/sh4 for instance?

I think so. but please wait for a while,

No problem, by definition, you own your code anyway. This was just a reminder that it's easier to discuss technical matters and get help from people when they have something to look at in the first place.

Quoted 8 lines

Although current code is enough for my application, there are a couple of features
that has to be tested or implemented to be available for you.
CONFIG_PREEMPT
Floating Point register context
oneshot timer
When finished, SH3 will also be supported.

Ack. TIA, then.

Quoted 158 lines

----- Original Message -----
From: "Philippe Gerum" <[email protected]>
To: "Kiichi Kameda" <[email protected]>
Cc: <[email protected]>
Sent: Monday, April 17, 2006 11:33 PM
Subject: Re: [Xenomai-help] Xenomai port to SH4

Quoted 4 lines
Quoted 2 lines · Kiichi Kameda

I have been porting Xenomai-2.0.2 to SH(SuperH) architecture. Currently almost all functions work well. And, I am mesuring the

performance

Quoted 1 line
Quoted 1 line

from user-space program using posix skin on a 240MHz SH7750R(SH4)

machine,

Quoted 3 lines
Quoted 3 lines

mainly 1 ms periodic dispatch latency. The measured data shows small latency(tens of micro seconds) when system has a light workload. In case of heavy workload such as frequent linux command input, the

latency

Quoted 95 lines
Quoted 95 lines

increases to some 200 micro seconds, though.

Following is the testsuit/latency/latency program(using native skin - slightly modified) output with comment.
In case of posix skin, the data shows similar tendency.

RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
...(no workload)
RTD| 333| 1400| 9733| 0| 333|
27066
RTD| 333| 1466| 34533| 0| 333|
34533
RTD| 266| 1400| 14533| 0| 266|
34533
RTD| 400| 1400| 14466| 0| 266|
34533
RTD| 333| 1333| 7533| 0| 266|
34533
RTD| 266| 1400| 14333| 0| 266|
34533
RTD| 333| 1400| 40866| 0| 266|
40866
RTD| 333| 1466| 25533| 0| 266|
40866
RTD| 266| 1400| 14400| 0| 266|
40866
RTD| 400| 1400| 13600| 0| 266|
40866
RTD| 266| 1400| 7466| 0| 266|
40866
RTD| 333| 1466| 40800| 0| 266|
40866
RTD| 333| 1400| 18466| 0| 266|
40866
RTD| 333| 1400| 13533| 0| 266|
40866
...
RTD| 333| 1333| 7133| 0| 266|
40866
(telnet login)
RTD| 266| 4400| 111000| 0| 266|
111000
RTD| 333| 1400| 27266| 0| 266|
111000
RTD| 333| 1466| 28000| 0| 266|
111000

RTD| 333| 1466| 33133| 0| 266|
111000
RTD| 333| 1466| 26800| 0| 266|
111000
(single ps aux command)
RTD| 333| 22800| 112533| 0| 266|
112533
RTD| 333| 1400| 19400| 0| 266|
112533
RTD| 266| 1466| 35000| 0| 266|
112533
RTD| 333| 1400| 7533| 0| 266|
112533
RTD| 333| 1400| 15733| 0| 266|
112533
RTD| 266| 1866| 71333| 0| 266|
112533
RTD| 333| 9866| 105866| 0| 266|
112533
RTD| 266| 1400| 14400| 0| 266|
112533

RTD| 266| 1400| 11266| 0| 266|
112533
RTD| 400| 1466| 50133| 0| 266|
112533
RTD| 333| 3066| 116866| 0| 266|
116866
(successive ps aux command)
RTD| 1266| 15933| 218866| 0| 266|
218866
RTD| 1266| 2400| 76666| 0| 266|
218866
RTD| 333| 1400| 15000| 0| 266|
218866
RTD| 266| 1400| 27600| 0| 266|
218866
RTD| 400| 1400| 15333| 0| 266|
218866
RTD| 266| 1333| 6933| 0| 266|
218866
RTD| 333| 1400| 16533| 0| 266|
218866
RTD| 400| 1800| 75933| 0| 266|
218866

Quoted 1 line
Quoted 1 line

It is enough possible I have misported the Xenomai to SH, but I also

think

Quoted 29 lines
Quoted 3 lines

Xenomai user-space program(primary mode) suffers such extra latency when Linux kernel runs Linux programs.

Likely cache management issues.

Quoted 2 lines

I will appreciate any suggestion for latency improvement.

Any code to share with us, Adeos/sh4 for instance?

Quoted 10 lines

Thank you,

Kiichi Kameda

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.
Signature · 1 line
Philippe.
#0 lore raw

I have been porting Xenomai-2.0.2 to SH(SuperH) architecture. Currently almost all functions work well. And, I am mesuring the performance from user-space program using posix skin on a 240MHz SH7750R(SH4) machine, mainly 1 ms periodic dispatch latency. The measured data shows small latency(tens of micro seconds) when system has a light workload. In case of heavy workload such as frequent linux command input, the latency increases to some 200 micro seconds, though.

Following is the testsuit/latency/latency program(using native skin - slightly modified) output with comment.
In case of posix skin, the data shows similar tendency.

RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
...(no workload)
RTD| 333| 1400| 9733| 0| 333|
27066
RTD| 333| 1466| 34533| 0| 333|
34533
RTD| 266| 1400| 14533| 0| 266|
34533
RTD| 400| 1400| 14466| 0| 266|
34533
RTD| 333| 1333| 7533| 0| 266|
34533
RTD| 266| 1400| 14333| 0| 266|
34533
RTD| 333| 1400| 40866| 0| 266|
40866
RTD| 333| 1466| 25533| 0| 266|
40866
RTD| 266| 1400| 14400| 0| 266|
40866
RTD| 400| 1400| 13600| 0| 266|
40866
RTD| 266| 1400| 7466| 0| 266|
40866
RTD| 333| 1466| 40800| 0| 266|
40866
RTD| 333| 1400| 18466| 0| 266|
40866
RTD| 333| 1400| 13533| 0| 266|
40866
...
RTD| 333| 1333| 7133| 0| 266|
40866
(telnet login)
RTD| 266| 4400| 111000| 0| 266|
111000
RTD| 333| 1400| 27266| 0| 266|
111000
RTD| 333| 1466| 28000| 0| 266|
111000

RTD| 333| 1466| 33133| 0| 266|
111000
RTD| 333| 1466| 26800| 0| 266|
111000
(single ps aux command)
RTD| 333| 22800| 112533| 0| 266|
112533
RTD| 333| 1400| 19400| 0| 266|
112533
RTD| 266| 1466| 35000| 0| 266|
112533
RTD| 333| 1400| 7533| 0| 266|
112533
RTD| 333| 1400| 15733| 0| 266|
112533
RTD| 266| 1866| 71333| 0| 266|
112533
RTD| 333| 9866| 105866| 0| 266|
112533
RTD| 266| 1400| 14400| 0| 266|
112533

RTD| 266| 1400| 11266| 0| 266|
112533
RTD| 400| 1466| 50133| 0| 266|
112533
RTD| 333| 3066| 116866| 0| 266|
116866
(successive ps aux command)
RTD| 1266| 15933| 218866| 0| 266|
218866
RTD| 1266| 2400| 76666| 0| 266|
218866
RTD| 333| 1400| 15000| 0| 266|
218866
RTD| 266| 1400| 27600| 0| 266|
218866
RTD| 400| 1400| 15333| 0| 266|
218866
RTD| 266| 1333| 6933| 0| 266|
218866
RTD| 333| 1400| 16533| 0| 266|
218866
RTD| 400| 1800| 75933| 0| 266|
218866

It is enough possible I have misported the Xenomai to SH, but I also think Xenomai user-space program(primary mode) suffers such extra latency when Linux kernel runs Linux programs.

I will appreciate any suggestion for latency improvement.

Thank you,

Kiichi Kameda

#2 lore raw
In reply to Philippe Gerum
Quoted 3 lines

Any code to share with us, Adeos/sh4 for instance?

I think so. but please wait for a while,
Although current code is enough for my application, there are a couple of features
that has to be tested or implemented to be available for you.
CONFIG_PREEMPT
Floating Point register context
oneshot timer
When finished, SH3 will also be supported.

----- Original Message -----
From: "Philippe Gerum" <[email protected]>
To: "Kiichi Kameda" <[email protected]>
Cc: <[email protected]>
Sent: Monday, April 17, 2006 11:33 PM
Subject: Re: [Xenomai-help] Xenomai port to SH4

Quoted 3 lines
Quoted 2 lines · Kiichi Kameda

I have been porting Xenomai-2.0.2 to SH(SuperH) architecture. Currently almost all functions work well. And, I am mesuring the

performance

Quoted 1 line
Quoted 1 line

from user-space program using posix skin on a 240MHz SH7750R(SH4)

machine,

Quoted 3 lines
Quoted 3 lines

mainly 1 ms periodic dispatch latency. The measured data shows small latency(tens of micro seconds) when system has a light workload. In case of heavy workload such as frequent linux command input, the

latency

Quoted 95 lines
Quoted 95 lines

increases to some 200 micro seconds, though.

Following is the testsuit/latency/latency program(using native skin - slightly modified) output with comment.
In case of posix skin, the data shows similar tendency.

RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
...(no workload)
RTD| 333| 1400| 9733| 0| 333|
27066
RTD| 333| 1466| 34533| 0| 333|
34533
RTD| 266| 1400| 14533| 0| 266|
34533
RTD| 400| 1400| 14466| 0| 266|
34533
RTD| 333| 1333| 7533| 0| 266|
34533
RTD| 266| 1400| 14333| 0| 266|
34533
RTD| 333| 1400| 40866| 0| 266|
40866
RTD| 333| 1466| 25533| 0| 266|
40866
RTD| 266| 1400| 14400| 0| 266|
40866
RTD| 400| 1400| 13600| 0| 266|
40866
RTD| 266| 1400| 7466| 0| 266|
40866
RTD| 333| 1466| 40800| 0| 266|
40866
RTD| 333| 1400| 18466| 0| 266|
40866
RTD| 333| 1400| 13533| 0| 266|
40866
...
RTD| 333| 1333| 7133| 0| 266|
40866
(telnet login)
RTD| 266| 4400| 111000| 0| 266|
111000
RTD| 333| 1400| 27266| 0| 266|
111000
RTD| 333| 1466| 28000| 0| 266|
111000

RTD| 333| 1466| 33133| 0| 266|
111000
RTD| 333| 1466| 26800| 0| 266|
111000
(single ps aux command)
RTD| 333| 22800| 112533| 0| 266|
112533
RTD| 333| 1400| 19400| 0| 266|
112533
RTD| 266| 1466| 35000| 0| 266|
112533
RTD| 333| 1400| 7533| 0| 266|
112533
RTD| 333| 1400| 15733| 0| 266|
112533
RTD| 266| 1866| 71333| 0| 266|
112533
RTD| 333| 9866| 105866| 0| 266|
112533
RTD| 266| 1400| 14400| 0| 266|
112533

RTD| 266| 1400| 11266| 0| 266|
112533
RTD| 400| 1466| 50133| 0| 266|
112533
RTD| 333| 3066| 116866| 0| 266|
116866
(successive ps aux command)
RTD| 1266| 15933| 218866| 0| 266|
218866
RTD| 1266| 2400| 76666| 0| 266|
218866
RTD| 333| 1400| 15000| 0| 266|
218866
RTD| 266| 1400| 27600| 0| 266|
218866
RTD| 400| 1400| 15333| 0| 266|
218866
RTD| 266| 1333| 6933| 0| 266|
218866
RTD| 333| 1400| 16533| 0| 266|
218866
RTD| 400| 1800| 75933| 0| 266|
218866

Quoted 1 line
Quoted 1 line

It is enough possible I have misported the Xenomai to SH, but I also

think

Quoted 27 lines
Quoted 3 lines

Xenomai user-space program(primary mode) suffers such extra latency when Linux kernel runs Linux programs.

Likely cache management issues.

Quoted 2 lines

I will appreciate any suggestion for latency improvement.

Any code to share with us, Adeos/sh4 for instance?

Quoted 10 lines

Thank you,

Kiichi Kameda

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.
#5 lore raw
In reply to Jan Kiszka

Hi,

Quoted 10 lines

If you are looking for real heavy load: cache benchmarks tend to stress your system most (e.g. http://www.cwi.nl/~manegold/Calibrator). Combine them with heavy i/o load (flood ping etc.).

Anyway, 200 us for a 240 MHz system doesn't sound totally unrealistic. But I do not know the sh4 architecture to give a reliable estimation.

What are your numbers when running latency in the other modes, i.e. without the need to switch to user space (mode 1, "-t1") or even without any context switch at all (mode 2, "-t2")?

The machine is a small embedded device that has various IOs, and I expect my user space application program runs 1ms periodically.
So jitter is important when I execute telnet login and run common linux commands.

By the way, the latency was improved a little.
I found linux system call handler run with interrupt masked. By adding the code to enable interrupt to entry.S which is architecture specific,
the latency is no more than 150us on the same conditions as in my last
mail.

Thanks,

Kiichi Kameda