public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Ajeet Yadav <ajeet.yadav.77@gmail.com>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: Not able to use HIGH_RES_TIMERS on ARM
Date: Tue, 20 Mar 2012 21:58:57 -0700	[thread overview]
Message-ID: <4F696011.7080409@linaro.org> (raw)
In-Reply-To: <20120319132623.GO15988@n2100.arm.linux.org.uk>

On 03/19/2012 06:26 AM, Russell King - ARM Linux wrote:
> On Mon, Mar 19, 2012 at 06:49:34PM +0530, Ajeet Yadav wrote:
>> Therefore our target configuration with 2.6 kernel was
>> GENERIC_CLOCKEVENTS=y, ARCH_USES_GETTIMEOFFSET=y,
> It's absolutely absurd to have a platform converted to use clockevents
> and clocksources, and then select ARCH_USES_GETTIMEOFFSET.  That's saying
> "I provide the new infrastructure, but I want the dodgy old compatibility
> which doesn't work properly with a set of other features as well".
>
>> I conclude that GENERIC_CLOCKEVENTS is supported, hence I must set
>> ARCH_USES_GETTIMEOFFSET=n, in order to use NO_HZ, HIGH_RES_TIMERS,
>> IRQSOFF_TRACER, PREEMPT_TRACER
> Correct.  If you're using clockevents and clocksources, you should not
> select ARCH_USES_GETTIMEOFFSET.
>

Hey Ajeet,
     As Russell pointed out, it looks like you're confused as to the use 
of ARCH_USES_GETTIMEOFFSET. That option is only for legacy systems that 
don't provide continuous clocksources that can be used for timekeeping.

In the past, time was incremented by one tick every timer interrupt.  
Some systems could use the timer hardware (usually PIT style 
decrementer) to calculate inter-tick times. Its only for this style of 
hardware, that either wraps or resets each tick, that GETTIMEOFFSET is 
needed.  If you have a continuous counter that doesn't wrap for a 
reasonable number of ticks, you want to use the clocksource abstraction 
to represent that hardware. That has the benefits of allowing high res 
timers and nohz, since we don't need to keep a constant tick-beat to 
keep time (and also avoids lost-ticks and a host of problems that tick 
based timekeeping can run into).

So I suspect you probably want to verify your hardware supports a 
clocksource and disable ARCH_USES_GETTIMEOFFSET.

Sorry for any confusion!

thanks
-john


  reply	other threads:[~2012-03-21  4:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 13:01 Not able to use HIGH_RES_TIMERS on ARM Ajeet Yadav
2012-03-19 13:04 ` Russell King - ARM Linux
2012-03-19 13:19   ` Ajeet Yadav
2012-03-19 13:26     ` Russell King - ARM Linux
2012-03-21  4:58       ` John Stultz [this message]
2012-03-21 10:16         ` Ajeet Yadav
2012-03-22  9:16           ` Ajeet Yadav
2012-03-22 10:02             ` Russell King - ARM Linux
2012-03-22 10:25               ` Ajeet Yadav
2012-03-23  3:23                 ` John Stultz
2012-03-23  4:59                   ` Ajeet Yadav
2012-03-23  9:10                   ` Ajeet Yadav
2012-03-23 14:28                     ` Steven Rostedt
2012-03-24  7:06                       ` Ajeet Yadav
2012-03-26 16:47                         ` Steven Rostedt
2012-03-23  3:28                 ` John Stultz
2012-03-23  5:52                   ` Ajeet Yadav
2012-03-23  6:17                     ` Rabin Vincent
2012-03-23  8:58                       ` Ajeet Yadav
2012-03-23 16:14                     ` Greg KH
2012-03-24  7:05                       ` Ajeet Yadav

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=4F696011.7080409@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=ajeet.yadav.77@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rostedt@goodmis.org \
    /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