All of lore.kernel.org
 help / color / mirror / Atom feed
From: "wilbur.chan" <wilbur512@gmail.com>
To: wu zhangjin <wuzhangjin@gmail.com>
Cc: Linux MIPS Mailing List <linux-mips@linux-mips.org>
Subject: Re: Clock Source in hrtimer
Date: Mon, 16 Aug 2010 00:00:03 +0800	[thread overview]
Message-ID: <AANLkTimVkN_SaHpkc4cFiSvfTZqGXiigkYsQaNFcx08q@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimm2NMwu8_OjqdWvcJ11KFzBiz8VTGgYwAcemhf@mail.gmail.com>

Hi wu,

2010/8/15 wu zhangjin <wuzhangjin@gmail.com>:

>
> don't worry about it, the timekeeper solves it:
>
> kernel/time/timekeeping.c
>
> The r4k timer in most of the MIPS variants also only has a 32bits
> counter register, no problem with it:
>
> arch/mips/kernel/csrc-r4k.c
> arch/mips/kernel/cevt-r4k.c
>
> does  xlr 732 also use such a timer (with MIPS count & compare
> registers of coprocessor0)?
>

yes, xlr732  use these two registers to generate timer interrupt,
with a frequency of 1GHZ



> If you need to get the time with high resolution, please use:
> getnstimeofday(), this function will return a linear time with the
> help of timekeeper(timekeeping_get_ns).
>


1)  So hrtimer is based on  xtime,

If CONFIG_NO_HZ is set , would xtime be updated on time and correctly ?


2) some question about __get_nsec_offset :

               /* read clocksource: */
	cycle_now = clocksource_read(clock);

	/* calculate the delta since the last update_wall_time: */
	cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;



if   cycle_now  is smaller than clock->cycle_last , say , cycle_now =
3 ,    cycle->cycle_last = 2^32-1 ,  then

cycle_delta  = 3 - (2^32-1)  =  ?


> Regards,
> Wu Zhangjin
>

      reply	other threads:[~2010-08-15 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-15  2:13 Clock Source in hrtimer wilbur.chan
2010-08-15  6:14 ` wu zhangjin
2010-08-15 16:00   ` wilbur.chan [this message]

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=AANLkTimVkN_SaHpkc4cFiSvfTZqGXiigkYsQaNFcx08q@mail.gmail.com \
    --to=wilbur512@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=wuzhangjin@gmail.com \
    /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.