public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Pawel Moll <pawel.moll@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>,
	Andy Lutomirski <luto@amacapital.net>,
	John Stultz <john.stultz@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Baruch Siach <baruch@tkos.co.il>,
	Thomas Gleixner <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] sched_clock: Track monotonic raw clock
Date: Tue, 22 Jul 2014 21:39:39 +0200	[thread overview]
Message-ID: <20140722193939.GA15507@localhost.localdomain> (raw)
In-Reply-To: <1406045849.25343.72.camel@hornet>

On Tue, Jul 22, 2014 at 05:17:29PM +0100, Pawel Moll wrote:
> That approach has been also discussed, last time in the mentioned
> thread:
> 
> http://thread.gmane.org/gmane.linux.kernel/1611683/focus=1612554
> http://thread.gmane.org/gmane.linux.kernel/1611683/focus=1612554
> 
> With both Ingo and John showing preference towards the clock alignment,
> so that's where I looked this time (I've already done custom perf
> ioctls, posix clocks... don't really know how many different ways I've
> tried).

I re-read that thread, and it sounds like Ingo also suggested simply
tracing the system time updates, leaving the correlation to the perf
clock to user space. This is what I mean, too.

John and Ingo said that exporting MONO-RAW would be "ideal", and maybe
it would be (in the sense of easy-to-use), but only if it were always
correct.  However, hacking some half baked servo into the kernel will
fail, at least some of the time.  When it does fail, there is no way
to figure out what happened, because the servo code obliterates the
information in the original time stamps.

So the only reasonable way, IMHO, is to simply provide the needed
information in the traces, and then add some user space code to find
the relationship between the perf clock and the system clock. The
great advantage of this approach is that you don't have to create a
perfect servo from day one. The time stamps can be re-analyzed at any
time after the fact.

And if you are going to use this for clusters, then you really want
the global time and not MONO-RAW. I would suggest using CLOCK_TAI.

Thanks,
Richard

  parent reply	other threads:[~2014-07-22 19:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 17:43 [RFC] sched_clock: Track monotonic raw clock Pawel Moll
2014-07-18 17:51 ` John Stultz
2014-07-18 19:06   ` Peter Zijlstra
2014-07-22 16:17   ` Pawel Moll
2014-07-18 19:13 ` Peter Zijlstra
2014-07-18 19:25   ` John Stultz
2014-07-18 19:34     ` Peter Zijlstra
2014-07-18 19:46       ` John Stultz
2014-07-18 20:22         ` Peter Zijlstra
2014-07-18 22:41           ` Peter Zijlstra
2014-07-22 16:17             ` Pawel Moll
2014-07-22 16:29               ` Peter Zijlstra
2014-07-22 16:17       ` Pawel Moll
2014-07-19  5:02 ` Richard Cochran
2014-07-22 16:17   ` Pawel Moll
2014-07-22 16:34     ` Peter Zijlstra
2014-07-22 16:48       ` Pawel Moll
2014-07-22 19:39     ` Richard Cochran [this message]
2014-09-12 11:45       ` Pawel Moll

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=20140722193939.GA15507@localhost.localdomain \
    --to=richardcochran@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baruch@tkos.co.il \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=pawel.moll@arm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sboyd@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox