mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: john stultz <johnstul@us.ibm.com>
Cc: Richard Henderson <rth@twiddle.net>,
	lkml <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Matt Turner <mattst88@gmail.com>
Subject: Re: [RFC][PATCH] Convert alpha to use clocksource
Date: Fri, 19 Mar 2010 13:07:10 +0300	[thread overview]
Message-ID: <20100319100710.GA938@jurassic.park.msu.ru> (raw)
In-Reply-To: <1268950758.4171.51.camel@localhost.localdomain>

On Thu, Mar 18, 2010 at 03:19:18PM -0700, john stultz wrote:
> On Fri, 2010-03-19 at 00:40 +0300, Ivan Kokshaysky wrote:
> > Yeah, that looks cool. I'm typing this on the 800MHz UP1500 running
> > 2.6.34-rc1 plus your patch, and the timekeeping works fine so far.
> 
> Nice! Thanks for testing! Another benefit that I forgot to mention, is
> that NTP adjustments will be made directly against the counter, instead
> of being made against the tick. This avoids possible small errors at
> tick time if the intertick interval doesn't match the actual tick
> length.
> 
> 
> > Though, even after a glance over the clocksource code, I've not
> > gotten yet to how one could estimate the "shift" value...
> > Any hints?
> 
> Yea, selecting a good shift is obnoxious. You want to pick the largest
> value of shift, so that it can be finely adjusted by ntp, but that
> creates large mult values, which can cause overflows for large cycle
> intervals. 
> 
> A function to solve this was actually recently added, but simply I
> forgot to use it. :P

Understood. ;-)

> I actually should rework the register function so you just give it a
> clocksource and a freq and it sets up both mult and shift for you. 
> 
> 
> > And if I recall correctly, production alphas have been clocked
> > in the range of 60-1250 MHz.
> 
> Cool. The shift value I picked should be ok then. But below is an
> updated version that uses the self-calculated method.

Excellent. Thanks a lot!

> >From 078e91d14cb5e82a3fab00cf74faf45f44336590 Mon Sep 17 00:00:00 2001
> From: John Stultz <johnstul@us.ibm.com>
> Date: Wed, 17 Mar 2010 12:43:11 -0700
> Subject: [PATCH] Convert alpha to use clocksources instead of arch_gettimeoffset
> 
> Alpha has a tsc like rpcc counter that it uses to manage time.
> This can be converted to an actual clocksource instead of utilizing
> the arch_gettimeoffset method that is really only there for legacy
> systems with no continuous counter.
> 
> Further cleanups could be made if alpha converted to the clockevent model.
> 
> I've not tested or compiled this code. Any help from the maintainers would
> be greatly appreciated
> 
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Richard Henderson <rth@twiddle.net>
> CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
> CC: Matt Turner <mattst88@gmail.com>
> Signed-off-by: John Stultz <johnstul@us.ibm.com>

Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Tested-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

Ivan.

  reply	other threads:[~2010-03-19 10:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18  2:01 John Stultz
2010-03-18 14:32 ` Richard Henderson
2010-03-18 17:55   ` john stultz
2010-03-18 21:40     ` Ivan Kokshaysky
2010-03-18 22:19       ` john stultz
2010-03-19 10:07         ` Ivan Kokshaysky [this message]
2010-03-19 16:47         ` Matt Turner
2010-03-19 17:13           ` Richard Henderson
2010-03-22 11:17       ` Johannes Weiner
2010-03-22 14:22         ` Thomas Gleixner
2010-03-22 16:41           ` Johannes Weiner

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=20100319100710.GA938@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=rth@twiddle.net \
    --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

all inboxes | Powered by JetHome®