From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: rpm@xenomai.org
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] Clock drift.
Date: Thu, 15 Jan 2009 13:30:23 +0000 [thread overview]
Message-ID: <496F3A6F.4060402@domain.hid> (raw)
In-Reply-To: <496F36EE.1070305@domain.hid>
Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
>> Gilles Chanteperdrix wrote:
>>> Philippe Gerum wrote:
>>>> Gilles Chanteperdrix wrote:
>>>>> Hi,
>>>>>
>>>>> I run clocktest on a system here, not running NTP, using
>>>>> CONFIG_GENERIC_CLOCKEVENT, with a systematic drift of 3us/s. How can
>>>>> this happen? Does it come from the error due to the multiply and shift
>>>>> used for tsc to/from ns conversions ?
>>>>>
>>>> - ipipe_request_tickdev() returning a timer freq we don't like?
>>> Well, I would expect ipipe_request_tickdev() to return the same
>>> frequency as the one used by Linux.
>>>
>> Yes it does. But this value is used by Xenomai code.
>
> It turns out that the frequency used to convert tsc to ns is the cpu
> frequency (which is kind of a misnomer, since your emulated tsc on arm
> does not run at cpu frequency), which is computed though it should have
> the same value as the timer frequency but is suject to rounding errors.
The timer frequency is as approximate as the cpu frequency,
ipipe_request_tickdev does this:
freq = (1000000000ULL * evtdev->mult) >> evtdev->shift;
*tmfreq = (unsigned long)freq;
--
Gilles.
next prev parent reply other threads:[~2009-01-15 13:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 13:39 [Xenomai-core] Clock drift Gilles Chanteperdrix
2009-01-14 13:50 ` Jan Kiszka
2009-01-14 13:55 ` Gilles Chanteperdrix
2009-01-14 13:53 ` Philippe Gerum
2009-01-14 14:00 ` Gilles Chanteperdrix
2009-01-14 14:06 ` Philippe Gerum
2009-01-15 13:15 ` Gilles Chanteperdrix
2009-01-15 13:30 ` Gilles Chanteperdrix [this message]
2009-01-15 13:50 ` Gilles Chanteperdrix
2009-01-15 13:32 ` Philippe Gerum
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=496F3A6F.4060402@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Xenomai-core@domain.hid \
--cc=rpm@xenomai.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 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.