linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Binoy Jayan <binoy.jayan@linaro.org>
Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Daniel Wagner <daniel.wagner@bmw-carit.de>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Masami <masami.hiramatsu@linaro.org>,
	Carsten Emde <C.Emde@osadl.org>
Subject: Re: [PATCH v6 3/4] tracing: Add trace_irqsoff tracepoints
Date: Wed, 14 Sep 2016 11:42:03 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1609141134441.6233@nanos> (raw)
In-Reply-To: <CAHv-k_-AxyBGsrAR7NpvYnbGU=5YhizkHOcp=hddPTKCvgw4Rg@mail.gmail.com>

Binoy,

On Wed, 14 Sep 2016, Binoy Jayan wrote:
> On 8 September 2016 at 13:36, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Wed, 7 Sep 2016, Binoy Jayan wrote:
> >> This captures only the latencies introduced by disabled irqs and
> >> preemption. Additional per process data has to be captured to calculate
> >> the effective latencies introduced for individual processes.
> >
> > And what is the additional per process data and how is it captured and
> > used?
> 
> This is the patch which would touch the scheduler code which I did not
> want to do.  I was trying to achieve the same using kprobes but did not
> get around to make it work with the histograms.

So the questions remain:

   - How is this facility useful on it's own?
   - What is the value of adding this?
   - How is it used and what valuable debug information can be collected?

And these questions need to be answered independently of additional data,
which you are obviously unable to sample.
    
> > Aside of that it is silly to evaluate trace_clock_local() for the actual
> > tracepoint simply because that time is already stored in the tracepoint
> > itself. The flow here is:
> >
> >         event = trace_event_buffer_lock_reserve();
> >         entry = ring_buffer_event_data(event);
> >         { <assign>; }  <-- Here we assign the entries by the __field and
> >                            __array macros.
> >
> >
> > So you should talk to Steven about having a way to retrieve that time from
> > entry itself in a generic way.
> >
> Steven mentioned that the timestamp in the ring buffer is in the offset
> form and also it may not be equivalent to trace_clock_local() time. I
> also tried using the timestamp from the per cpu trace data but it did not
> seem to provide correct value for the timestamp.

That's what we have today. Now if we want to add something like this then
we really want to avoid reading timestamps twice. And it's irrelevant
whether the timestamp comes from trace_clock_local() or
ktime_get_[mono|raw]_fast_ns because you can do the histogram based on that
as well.

Fact is that the tracer core itself takes a timestamp already and it should
not be rocket science to make the core store it as a full timestamp when
requested by the caller. Such a store is way cheeper than accessing
hardware over and over.

Thanks,

	tglx

  reply	other threads:[~2016-09-14  9:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 11:13 [PATCH v6 0/4] *** Latency histograms - IRQSOFF,PREEMPTOFF, Delayed HRTIMERS *** Binoy Jayan
2016-09-07 11:13 ` [PATCH v6 1/4] tracing: Deference pointers without RCU checks Binoy Jayan
2016-09-08  6:46   ` Masami Hiramatsu
2016-09-07 11:13 ` [PATCH v6 2/4] tracing: Add hist trigger support for generic fields Binoy Jayan
2016-09-07 13:39   ` kbuild test robot
2016-09-07 11:13 ` [PATCH v6 3/4] tracing: Add trace_irqsoff tracepoints Binoy Jayan
2016-09-07 16:42   ` Thomas Gleixner
2016-09-08  5:20     ` Daniel Wagner
2016-09-08  6:31       ` Thomas Gleixner
2016-09-08  8:06   ` Thomas Gleixner
2016-09-12 13:50     ` Steven Rostedt
2016-09-14  6:52     ` Binoy Jayan
2016-09-14  9:42       ` Thomas Gleixner [this message]
2016-09-07 11:13 ` [PATCH v6 4/4] tracing: Histogram for delayed hrtimer offsets Binoy Jayan
2016-09-08  6:56   ` Masami Hiramatsu
2016-09-08  7:10   ` Thomas Gleixner
2016-09-08  9:39     ` Binoy Jayan
2016-09-09 13:30       ` Thomas Gleixner
2016-09-23 14:20         ` Carsten Emde
2016-09-09 17:10       ` Mark Brown
2016-09-10  6:10         ` Thomas Gleixner

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=alpine.DEB.2.20.1609141134441.6233@nanos \
    --to=tglx@linutronix.de \
    --cc=C.Emde@osadl.org \
    --cc=arnd@arndb.de \
    --cc=binoy.jayan@linaro.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu@linaro.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.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 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).