All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] i-pipe tracer on in production kernels? (was Re: Altera Cyclone V)
Date: Sat, 11 Jan 2014 20:01:08 +0100	[thread overview]
Message-ID: <52D194F4.6030706@xenomai.org> (raw)
In-Reply-To: <52D18D0A.8010905@xenomai.org>

On 01/11/2014 07:27 PM, Gilles Chanteperdrix wrote:
> On 01/11/2014 07:20 PM, Philippe Gerum wrote:
>> On 01/11/2014 11:22 AM, Michael Haberler wrote:
>>>
>>> http://www.xenomai.org/index.php/I-pipe:Tracer describes the trace API, which could be useful to track down issues
>>>
>>> Q: does enabling the tracer incur significant overhead if compiled in but unused, or is it reasonable to leave it on in a production kernel?
>>>
>>> if the former, we might have to build/make available a second i-pipe tracer enabled kernel to track down issues 'in the field'; if the latter, it'd be less build/distribution chores
>>>
>>
>> The I-pipe tracer is based on the ftrace infrastructure, so tracepoints
>> are left out when the tracer is disabled. If you can live with the
>> minimal overhead ftrace adds, then leaving the I-pipe tracer code built
>> in may be an option.
>
> That is less true without DYNAMIC_FTRACE than with DYNAMIC_FTRACE.
>
>

This is about 10% overhead on low-end 52xx, 5-7% on am335x. I did not check on typical x86 < 2 Ghz yet, but this should be around 3-5%. It is just a matter of how much is too much.

Regarding DYNAMIC_FTRACE, we have had this out for too many moons (2.6.2x...), and we need to reconsider this (this looks somewhat like an old writing from an ancient book, nobody really remembers the meaning of - I wonder if I was not the guy who switched this off, out of some nightmare debugging session).

Anyway, enabling it on am335x looks ok at first sight, and I suspect that the usual problem of synchronizing better and harder against the code patching loop is gone.

i.e.

root@android:/ # cat /proc/ipipe/trace/enable                                  
1
root@android:/ # /bin/latency [   93.709690] request_suspend_state: wakeup (0->0) at 93601080338 (2000-01-01 00:54:46.112646335 UTC)
[   93.760153] init: untracked pid 637 exited
[   93.764831] init: untracked pid 638 exited

== 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|     26.999|     45.833|     72.958|       0|     0|     26.999|     72.958
RTD|     25.749|     47.208|     71.499|       0|     0|     25.749|     72.958
RTD|     25.416|     47.124|     73.333|       0|     0|     25.416|     73.333
RTD|     25.916|     46.541|     72.499|       0|     0|     25.416|     73.333
RTD|     27.124|     47.583|     75.624|       0|     0|     25.416|     75.624
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|     25.416|     46.833|     75.624|       0|     0|    00:00:05/00:00:05
root@android:/ # echo 0 > /proc/ipipe/trace/enable                             
root@android:/ # /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.209|     21.291|     57.499|       0|     0|     -3.209|     57.499
RTD|      0.000|     26.666|     53.208|       0|     0|     -3.209|     57.499
RTD|      2.291|     19.041|     57.958|       0|     0|     -3.209|     57.958
RTD|      0.999|     16.541|     56.624|       0|     0|     -3.209|     57.958
RTD|      2.333|     17.291|     51.958|       0|     0|     -3.209|     57.958
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|     -3.209|     20.166|     57.958|       0|     0|    00:00:05/00:00:05
root@android:/ # [  116.008470] request_suspend_state: wakeup (0->0) at 115899865474 (2000-01-01 00:55:08.411433263 UTC)
[  116.027659] init: untracked pid 898 exited
[  116.039731] init: untracked pid 899 exited


-- 
Philippe.


  reply	other threads:[~2014-01-11 19:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 19:52 [Xenomai] Altera Cyclone V Lowell Gilbert
2014-01-07 20:25 ` Gilles Chanteperdrix
2014-01-08 22:45   ` Lowell Gilbert
2014-01-08 23:19     ` Gilles Chanteperdrix
2014-01-09 18:06       ` Lowell Gilbert
2014-01-10  0:14         ` Gilles Chanteperdrix
2014-01-14  0:15       ` Lowell Gilbert
2014-01-07 22:19 ` Charles Steinkuehler
2014-01-07 22:47   ` Gilles Chanteperdrix
2014-01-07 22:55     ` Charles Steinkuehler
2014-01-07 23:13       ` Gilles Chanteperdrix
2014-01-08  0:51         ` Charles Steinkuehler
2014-01-08  4:04           ` Charles Steinkuehler
2014-01-08  8:21             ` Gilles Chanteperdrix
2014-01-08  8:58             ` Gilles Chanteperdrix
2014-01-11 10:22           ` [Xenomai] i-pipe tracer on in production kernels? (was Re: Altera Cyclone V) Michael Haberler
2014-01-11 12:16             ` Gilles Chanteperdrix
2014-01-11 18:11             ` Gilles Chanteperdrix
2014-01-11 18:20             ` Philippe Gerum
2014-01-11 18:27               ` Gilles Chanteperdrix
2014-01-11 19:01                 ` Philippe Gerum [this message]
2014-01-11 19:11                   ` Gilles Chanteperdrix
2014-01-08  3:21     ` [Xenomai] Altera Cyclone V Lowell Gilbert

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=52D194F4.6030706@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.