All of lore.kernel.org
 help / color / mirror / Atom feed
From: gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
To: Paolo <prallo@gmail.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Problems with FTrace
Date: Mon, 05 Oct 2009 08:58:34 +0530	[thread overview]
Message-ID: <4AC967E2.5070907@linux.vnet.ibm.com> (raw)
In-Reply-To: <6f2879e10909280832x3e5fadebha9b2966495812da8@mail.gmail.com>

Hi Paolo,

Paolo wrote:
> I need to know if a task is periodic or not and other informations (as
> the duration). I used the sched_switch function of ftrace to trace
> this behaviour.
> In order to have a proof of the tracing I used the cyclictest program.
> 
> The first time I tested the tracing goddness with a single cpu and the
> second time with all cpu online (2).
> In the first call the times was correct, in the second not: the
> periodicity of the cyclictask doesn't seem correct.
> 
> The periodicity is the interval between two wakes up of the same task
> and has to be  more or less constant, right?
> The difference between two wakes up in my test (with 2 cpu) is not
> constant, and the misured time is very different from the time set.
> 

I suspect if sirq-timer is taking up the chance to slightly disturb the
periodicity. To confirm more, you can try with sched_switch visualizer

http://www.osadl.org/Visualize-the-temporal-relationship-of-L.taks-visualizer.0.html

Thanks,
Gowri

> The test was:
> 
> mount -t debugfs nodev /tmp
> 
> echo nop > /tmp/tracing/current_tracer
> echo 1 > /tmp/tracing/tracing_enabled
> echo 0 > /tmp/tracing/tracing_enabled
> 
> echo sched_switch > /tmp/tracing/current_tracer
> echo 1 > /tmp/tracing/tracing_enabled
> 
> ./cyclictest -l 1000 -i 500 -n -t1
> 
> echo 0 > /tmp/tracing/tracing_enabled
> 
> The trace file shows (cat trace | grep + | grep 5036, where 5036 is
> the pid of the cyclictest thread):
> ...
>           <idle>-0     [001]   174.705470:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.705559:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.705648:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.705738:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.705966:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.706056:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.706500:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.706999:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.707505:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.707602:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.707691:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.707781:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.707868:      0:140:R   + [001]  5036:120:S
>           <idle>-0     [001]   174.707957:      0:140:R   + [001]  5036:120:S
> ...
> 
> Maybe I didn't set correctly the parameter of cyclictest and/or sched_switch.
> Is it possible a bug? Notice I use the 2.6.29.rc6 kernel.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


      reply	other threads:[~2009-10-05  3:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28 15:32 Problems with FTrace Paolo
2009-10-05  3:28 ` gowrishankar [this message]

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=4AC967E2.5070907@linux.vnet.ibm.com \
    --to=gowrishankar.m@linux.vnet.ibm.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=prallo@gmail.com \
    /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.