All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Drew Richardson <drew.richardson@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Ingo Molnar <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Wade Cherry <Wade.Cherry@arm.com>,
	Pawel Moll <Pawel.Moll@arm.com>
Subject: Re: [PATCHv3] ftrace: Provide trace clock monotonic raw
Date: Fri, 8 May 2015 09:05:24 -0700	[thread overview]
Message-ID: <CALAqxLVprmPpuqkMVKJrAUjOUsq59s1JzeYtpHiWh9SrA0f9fA@mail.gmail.com> (raw)
In-Reply-To: <20150508104120.3de866e0@gandalf.local.home>

On Fri, May 8, 2015 at 7:41 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Fri, 8 May 2015 07:30:39 -0700
> Drew Richardson <drew.richardson@arm.com> wrote:
>
>> Expose the NMI safe accessor to the monotonic raw clock to the
>> tracer. The mono clock was added with commit
>> 1b3e5c0936046e7e023149ddc8946d21c2ea20eb. The advantage of the
>> monotonic raw clock is that it will advance more constantly than the
>> monotonic clock.
>>
>> Imagine someone is trying to optimize a particular program to reduce
>> instructions executed for a given workload while minimizing the effect
>> on runtime. Also suppose that NTP is running and potentially making
>> larger adjustments to the monotonic clock. If NTP is adjusting the
>> monotonic clock to advance more rapidly, the program will appear to
>> use fewer instructions per second but run longer than if the monotonic
>> raw clock had been used. The total number of instructions observed
>> would be the same regardless of the clock source used, but how it's
>> attributed to time would be affected.
>>
>> Conversely if NTP is adjusting the monotonic clock to advance more
>> slowly, the program will appear to use more instructions per second
>> but run more quickly. Of course there are many sources that can cause
>> jitter in performance measurements on modern processors, but let's
>> remove NTP from the list.
>>
>> The monotonic raw clock can also be useful for tracing early boot,
>> e.g. when debugging issues with NTP.
>>
>
> Peter, Thomas, John, you OK with this?

Yea. No objections from me wrt the functionality of the patch.

I'd just again maybe caution folks to not go too far in assuming
CLOCK_MONOTONIC_RAW doesn't have frequency changes, as the underlying
hardware will drift due to varying thermal conditions.

thanks
-john

  reply	other threads:[~2015-05-08 16:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 14:41 [PATCH] ftrace: Provide trace clock monotonic raw Drew Richardson
2015-05-04 15:10 ` Mathieu Desnoyers
2015-05-04 20:05   ` Drew Richardson
2015-05-04 20:47     ` John Stultz
2015-05-04 20:57     ` Peter Zijlstra
2015-05-05 14:54       ` Drew Richardson
2015-05-08  0:42         ` Steven Rostedt
2015-05-08  1:27           ` Mathieu Desnoyers
2015-05-08 14:09         ` Steven Rostedt
2015-05-08 14:29           ` Drew Richardson
2015-05-08 14:30           ` [PATCHv3] " Drew Richardson
2015-05-08 14:41             ` Steven Rostedt
2015-05-08 16:05               ` John Stultz [this message]
2015-05-08 16:15                 ` Steven Rostedt
2015-05-08 16:21                   ` John Stultz
2015-05-08 16:11               ` Peter Zijlstra
2015-05-12 14:26               ` Thomas Gleixner
2015-05-12 19:59                 ` Steven Rostedt

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=CALAqxLVprmPpuqkMVKJrAUjOUsq59s1JzeYtpHiWh9SrA0f9fA@mail.gmail.com \
    --to=john.stultz@linaro.org \
    --cc=Pawel.Moll@arm.com \
    --cc=Wade.Cherry@arm.com \
    --cc=drew.richardson@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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.