All of lore.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
Subject: Re: [RFC] sched_clock: Track monotonic raw clock
Date: Sat, 19 Jul 2014 07:02:33 +0200	[thread overview]
Message-ID: <20140719050233.GA4408@netboy> (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 code definitely needs more work and testing (I'm not 100%
> sure if the Kp and Ki I've picked for the proportional and
> integral terms are universal),

I wouldn't bet on it.

> but for now wanted to see
> if this approach makes any sense whatsoever.

You are reading sched_clock and mono-raw together every so
often. Really stupid question: Why not just place that information
into the trace buffer and let user space do the clock correction?

...

> +		/* Tune the cyc_to_ns formula */
> +		mult_adj = sign * (error >> 2) + (cd.error_int >> 2);

So Kp = Ki = 0.25? And did you say that the sample rate is 10/second?

I guess that, while this works well on your machine, it might not
always do so, depending on the mono-raw clock. Probably Kp/i need to
be tunable to a particular system. Even better would be to leave this
out of the kernel altogether.

Thanks,
Richard

  parent reply	other threads:[~2014-07-19  5:02 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 [this message]
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=20140719050233.GA4408@netboy \
    --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 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.