public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: sboyd@codeaurora•org (Stephen Boyd)
To: linux-arm-kernel@lists•infradead.org
Subject: [GIT PULL] Timer clean-ups for 3.10, Part 2
Date: Wed, 17 Apr 2013 11:22:34 -0700	[thread overview]
Message-ID: <516EE86A.9070003@codeaurora.org> (raw)
In-Reply-To: <516EA638.1060800@gmail.com>

On 04/17/13 06:40, Rob Herring wrote:
> On 04/16/2013 07:27 PM, Stephen Boyd wrote:
>> On 04/11/13 13:44, Rob Herring wrote:
>>> Rob Herring (13):
>>>       ARM: sched_clock: allow changing to higher frequency counter
>>>       ARM: make sched_clock just call a function pointer
>>>       ARM: arch_timer: use full 64-bit counter for sched_clock
>> If I leave my system in the bootloader for a while this seems to cause
>> my sched_clock timestamps to jump once the sched_clock is setup. It also
>> sets up a sched_clock twice because read_sched_clock ==
>> jiffy_sched_clock_read.
>>
>> [    0.000000] Switching to timer-based delay loop
>> [    0.000000] sched_clock: ARM arch timer >56 bits at 19200kHz,
>> resolution 52ns
>> [    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns,
>> wraps every 4294967286ms
>> [    0.000000] Console: colour dummy device 80x30
>> [16645.193054] Calibrating delay loop (skipped), value calculated using
>> timer frequency.. 38.40 BogoMIPS (lpj=192000)
>>
>> I suspect it's because we don't do any cyc_to_sched_clock() stuff in the
>> arm architected timer case. Instead we just return the value from the
>> counter when we really should do some sort of subtraction from the first
>> value we read.
>>
>> I'm also curious how this is going to work for suspend/resume because it
>> doesn't look like we're going to stop sched_clock on arm architected
>> timer systems. See 6a4dae5e138a3 (ARM: 7565/1: sched: stop sched_clock()
>> during suspend, 2012-10-23) for why we need to do this.
>
> Well, I think arm64 is broken in both ways too. So we should fix this
> for both.
>
> I think this can be handled in a much more simple way than the 32-bit
> code since we don't need to deal with wrapping.
>
> Maintain a cycle offset that starts as the cycle count at init time.
> This offset can be subtracted from the current count. On suspend and
> resume, we need to calculate the cycle count delta while in suspend and
> then add this to the cycle offset.

Agreed. It looks like we're missing out on the irq time accounting stuff
because enable_sched_clock_irqtime() is never called too.

>
>> Finally, looks like this is unused now...
> Yes, but that's unrelated to anything I did.

Yes,  I didn't mean to say it was anything you did.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  reply	other threads:[~2013-04-17 18:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 20:44 [GIT PULL] Timer clean-ups for 3.10, Part 2 Rob Herring
2013-04-11 20:57 ` Arnd Bergmann
2013-04-12  1:33   ` Haojian Zhuang
2013-04-13  6:50   ` Olof Johansson
2013-04-15 13:36     ` Rob Herring
2013-04-15 21:20       ` Arnd Bergmann
2013-04-17 16:57         ` Olof Johansson
2013-04-17 18:48           ` Olof Johansson
2013-04-19 10:52             ` Kukjin Kim
2013-04-16 19:24       ` Olof Johansson
2013-04-17  0:27 ` Stephen Boyd
2013-04-17 13:40   ` Rob Herring
2013-04-17 18:22     ` Stephen Boyd [this message]
2013-04-17 23:18       ` Rob Herring

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=516EE86A.9070003@codeaurora.org \
    --to=sboyd@codeaurora$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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