linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Mark_H_Johnson@raytheon.com
Cc: Amit Shah <amit.shah@codito.com>,
	Karsten Wiese <annabellesgarden@yahoo.de>,
	Bill Huey <bhuey@lnxw.com>, Adam Heath <doogie@debian.org>,
	emann@mrv.com, Gunther Persoons <gunther_persoons@spymac.com>,
	"K.R. Foley" <kr@cybsft.com>,
	linux-kernel@vger.kernel.org,
	Florian Schmidt <mista.tapas@gmx.net>,
	Fernando Pablo Lopez-Lezcano <nando@ccrma.Stanford.EDU>,
	Lee Revell <rlrevell@joe-job.com>,
	Rui Nuno Capela <rncbc@rncbc.org>,
	Shane Shrybman <shrybman@aei.ca>,
	Thomas Gleixner <tglx@linutronix.de>,
	Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Subject: Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.23
Date: Thu, 11 Nov 2004 13:51:28 +0100	[thread overview]
Message-ID: <20041111125128.GA25126@elte.hu> (raw)
In-Reply-To: <OFB20B576E.5695CD7C-ON86256F48.0050136F@raytheon.com>


* Mark_H_Johnson@raytheon.com <Mark_H_Johnson@raytheon.com> wrote:

> I was thinking about this problem this morning and was wondering if
> we could do something like an "end trigger" to help determine the cause
> of some of these pauses. Something like:
>  - start to fill / refresh the trace buffer (already doing this?)
>  - run RT CPU loop & sample TSC every 100 iterations or so
>  - if delta T exceeds 100 usec (or so), then set "end trigger" and
> dump the data from /proc/latency_trace.
> Repeat with some rate limit so we don't get too much data.

we had most of this in the tracer already, just obscured a bit.

In the current tree i've separated all the functionality into the
following flags: trace_enabled, trace_user_triggered, trace_freerunning.
When user_triggered is enabled all the other timing related tracing
activities stops (wakeup & critical/irq timing), and userspace is the
master of when tracing starts and stops. The way to turn the tracer
on/off is still the gettimeofday API hack:

	gettimeofday(0,1);
	gettimeofday(0,0);

i enhanced this user-defined tracing with a timing mechanism: the kernel
measures the latency between on and off and does the usual max-latency
or threshold tracking and saves the latency trace into
/proc/latency_trace only if the latency condition triggers. So userspace 
only has to add the start/stop hooks and the kernel will deal with the 
rest.

the freerunning flag can be used to generate traces where there's no
natural 'start' event, only some well-defined "we have a latency
problem" point. The application can start tracing at startup (or you can
start it via a different app), and it's enough to stop tracing when
there's a problem - the last ~4000 trace entries will be copied into
/proc/latency_trace. (the timing mechanism is still present in this mode
as well.)

(Freerunning mode can also be used if for some reason the delays are too
long to be fully traced and if the 'interesting' stuff is at the end of
the delay.)

This stuff will show up in the next release, later today. It should
cover the needs that your tests have at the moment, correct? 

	Ingo

  reply	other threads:[~2004-11-11 11:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-10 14:51 [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.23 Mark_H_Johnson
2004-11-11 12:51 ` Ingo Molnar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-10 17:35 Mark_H_Johnson
2004-11-11 11:38 ` Ingo Molnar
2004-11-10 17:31 Mark_H_Johnson
2004-11-10 15:57 Mark_H_Johnson
2004-11-10 17:06 ` Ingo Molnar
2004-11-10 14:12 Mark_H_Johnson
2004-11-10 14:08 Mark_H_Johnson
2004-11-10 15:25 ` Ingo Molnar
2004-11-09 21:07 Mark_H_Johnson
2004-11-09 23:20 ` Ingo Molnar
2004-11-09 23:26 ` Ingo Molnar
2004-10-21 13:27 [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9 Ingo Molnar
2004-10-22 13:35 ` [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9.3 Ingo Molnar
2004-10-22 15:50   ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10 Ingo Molnar
2004-10-22 17:56     ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2 Ingo Molnar
2004-10-25 10:40       ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Ingo Molnar
2004-10-27  0:15         ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3 Ingo Molnar
2004-11-03 10:58           ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1 Ingo Molnar
2004-11-06 15:57             ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.18 Ingo Molnar
2004-11-08  9:16               ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.19 Ingo Molnar
2004-11-08 16:57                 ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.21 Ingo Molnar
2004-11-09 16:05                   ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.23 Ingo Molnar
2004-11-10 13:52                     ` Karsten Wiese
2004-11-10 13:58                       ` Karsten Wiese
2004-11-10 15:01                       ` Ingo Molnar
2004-11-10 14:20                         ` Karsten Wiese
2004-11-10 14:50                           ` Karsten Wiese
2004-11-10 15:33                           ` Ingo Molnar
2004-11-11  4:34                     ` K.R. Foley
2004-11-11  5:01                     ` K.R. Foley
2004-11-11  9:52                       ` Ingo Molnar
2004-11-11 10:20                       ` Ingo Molnar
2004-11-11 13:05                         ` Ingo Molnar
2004-11-11 12:27                           ` K.R. Foley

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=20041111125128.GA25126@elte.hu \
    --to=mingo@elte.hu \
    --cc=Mark_H_Johnson@raytheon.com \
    --cc=amit.shah@codito.com \
    --cc=annabellesgarden@yahoo.de \
    --cc=bhuey@lnxw.com \
    --cc=doogie@debian.org \
    --cc=emann@mrv.com \
    --cc=gunther_persoons@spymac.com \
    --cc=kr@cybsft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mista.tapas@gmx.net \
    --cc=nando@ccrma.Stanford.EDU \
    --cc=rlrevell@joe-job.com \
    --cc=rncbc@rncbc.org \
    --cc=shrybman@aei.ca \
    --cc=tglx@linutronix.de \
    --cc=xschmi00@stud.feec.vutbr.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).