public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Pawel Moll <pawel.moll@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>, 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
Subject: Re: [RFC] sched_clock: Track monotonic raw clock
Date: Fri, 18 Jul 2014 21:13:38 +0200	[thread overview]
Message-ID: <20140718191338.GF3935@laptop> (raw)
In-Reply-To: <1405705419-4194-1-git-send-email-pawel.moll@arm.com>

On Fri, Jul 18, 2014 at 06:43:39PM +0100, Pawel Moll wrote:
> This change is trying to make the sched clock "similar" to the
> monotonic raw one.
> 
> The main goal is to provide some kind of unification between time
> flow in kernel and in user space, mainly to achieve correlation
> between perf timestamps and clock_gettime(CLOCK_MONOTONIC_RAW).
> This has been suggested by Ingo and John during the latest
> discussion (of many, we tried custom ioctl, custom clock etc.)
> about this:
> 
> http://thread.gmane.org/gmane.linux.kernel/1611683/focus=1612554
> 
> For now I focused on the generic sched clock implementation,
> but similar approach can be applied elsewhere.
> 
> Initially I just wanted to copy epoch from monotonic to sched
> clock at update_clock(), but this can cause the sched clock
> going backwards in certain corner cases, eg. when the sched
> clock "increases faster" than the monotonic one. I believe
> it's a killer issue, but feel free to ridicule me if I worry
> too much :-)

But on hardware using generic sched_clock we use the exact same hardware
as the regular timekeeping, right?

So we could start off with the same offset/mult/shift and never deviate,
or is that a silly question?, I've never really looked at the generic
sched_clock stuff too closely.

  parent reply	other threads:[~2014-07-18 19:13 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 [this message]
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
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=20140718191338.GF3935@laptop \
    --to=peterz@infradead.org \
    --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=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