mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Binoy Jayan <binoy.jayan@linaro.org>
Cc: Carsten Emde <C.Emde@osadl.org>,
	"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>,
	Mark Brown <mark.brown@linaro.org>
Subject: Re: [RFC PATCH v7 4/5] tracing: Measure delayed hrtimer offset latency
Date: Thu, 22 Sep 2016 19:28:01 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1609221910060.5599@nanos> (raw)
In-Reply-To: <CAHv-k_-yVqZXJeHugoYg0_XmT0Gb14wv0c+DS1qf5PKUhSMcJA@mail.gmail.com>

Binoy,

On Thu, 22 Sep 2016, Binoy Jayan wrote:
> The condition 'ktime_to_ns(tim) < ktime_to_ns(now)' checks if the timer
> has already expired w.r.t. 'soft timeout' value as it does not include
> the slack value 'delta_ns'. In that case 'tim_expiry' is normalized to
> the current time.

You are halfways coming close to the point why this is done, but your
conclusion is completely wrong.  The correct keyword is "expired", but
anything else is just random speculation.

> (I was under the impression that this inaccuracy
> could be because timer was initially running on a different cpu. If that
> is not the case, I guess we can use the code mentioned below).

We are not playing a guessing game here.
 
> I am using 'hrtimer_get_softexpires_tv64' instead of 'hrtimer_get_expires'
> so that 'latency' is never negative. Please let me know if this looks ok.

No it does not. And it won't look correct until you finally sit down and
decode and understand the functionality behind this code.

I'm not going to continue this, as it's not my job to explain you the code
which you are trying to submit.

I'm not blaming you, but I blame the responsible persons inside your
company who task you with that and expect that I'm going to do their work
of explaining to you how that code works.

@Arnd, @Mark: I'm starting to get seriously grumpy about that.

Thanks,

	tglx

  reply	other threads:[~2016-09-22 17:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 13:51 [RFC PATCH v7 0/5] *** Latency histograms *** Binoy Jayan
2016-09-20 13:51 ` [RFC PATCH v7 1/5] tracing: Dereference pointers without RCU checks Binoy Jayan
2016-09-20 13:51 ` [RFC PATCH v7 2/5] tracing: Add hist trigger support for generic fields Binoy Jayan
2016-09-20 13:51 ` [RFC PATCH v7 3/5] tracing: Add preemptirqsoff timing events Binoy Jayan
2016-09-20 13:51 ` [RFC PATCH v7 4/5] tracing: Measure delayed hrtimer offset latency Binoy Jayan
2016-09-20 14:19   ` Thomas Gleixner
2016-09-21  6:06     ` Binoy Jayan
2016-09-21 15:58       ` Thomas Gleixner
2016-09-22  9:14         ` Binoy Jayan
2016-09-22 17:28           ` Thomas Gleixner [this message]
2016-09-22 19:23             ` Mark Brown
2016-09-20 13:51 ` [RFC PATCH v7 5/5] tracing: wakeup latency events and histograms Binoy Jayan

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.1609221910060.5599@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=mark.brown@linaro.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

all inboxes | Powered by JetHome®