From: Jan Kiszka <jan.kiszka@domain.hid>
To: Fillod Stephane <stephane.fillod@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Synchronising TSC and periodic timer
Date: Wed, 15 Mar 2006 18:20:42 +0100 [thread overview]
Message-ID: <44184CEA.2000901@domain.hid> (raw)
In-Reply-To: <1CFEB358338412458B21FAA0D78FE86D02CABF1C@rennsmail02.eu.thmulti.com>
[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]
Fillod Stephane wrote:
> Jan Kiszka wrote:
>> Gilles Chanteperdrix wrote:
>>> Jan Kiszka wrote:
>>> > Likely too simple: The periodic IRQ seems to pop up on every CPU
> so that
>>> > the TSC could be recorded, but will this happen synchronously? At
> least
>>> > we will see (IRQ) jitters, and those jitters could already create
> in the
>>> > single-CPU case a non-monotonic clock...
>>>
>>> I do not know how this issue is solved in Linux, but there seem to be
> a
>>> simple solution: before adding the tsc offset to the last tick time,
>>> this tsc offset should be compared with the tick duration in tsc
>>> counts; if it is greater, then replace with the tick duration in tsc.
>>>
>> Hmm, I would rather express it in absolute tsc values, i.e. always save
>> the tuple (absolute_tsc, jiffies):
>>
>> [timer IRQ]
>> new_tsc = read_rsc() - old_tsc;
>> if (new_tsc < old_tsc + period_in_tsc_ticks)
>> new_tsc = old_tsc + period_in_tsc;
>> old_tsc = new_tsc;
>>
>> Disclaimer: I haven't thought about potential accuracy side effects of
>> this implementation, e.g. what would happen over the long term if the
>> condition is always fulfilled and executed...
>
> Aha! the wonderful world of PLL's :-)
>
Yes! I was waiting for someone to throw this in ;). But do we really
need them, or are there so cheap implementations that the overhead
doesn't matter?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next parent reply other threads:[~2006-03-15 17:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1CFEB358338412458B21FAA0D78FE86D02CABF1C@rennsmail02.eu.thmulti.com>
2006-03-15 17:20 ` Jan Kiszka [this message]
2006-03-14 20:45 [Xenomai-core] Synchronising TSC and periodic timer Jan Kiszka
2006-03-15 7:24 ` Jan Kiszka
[not found] ` <4417C74D.3060203@domain.hid>
2006-03-15 8:14 ` Jan Kiszka
2006-03-15 12:59 ` Philippe Gerum
2006-03-15 13:26 ` Gilles Chanteperdrix
2006-03-15 22:58 ` Philippe Gerum
2006-03-20 11:48 ` Jan Kiszka
2006-03-20 13:26 ` Philippe Gerum
2006-03-20 14:42 ` Rodrigo Rosenfeld Rosas
2006-03-20 16:51 ` Philippe Gerum
2006-03-20 19:27 ` Rodrigo Rosenfeld Rosas
2006-03-21 0:11 ` Jan Kiszka
2006-03-21 3:11 ` Rodrigo Rosenfeld Rosas
2006-03-20 14:46 ` Jan Kiszka
2006-03-21 12:44 ` Philippe Gerum
2006-03-24 13:14 ` Jan Kiszka
[not found] ` <200603201137.12548.rosenfeld@domain.hid>
2006-03-20 15:23 ` Philippe Gerum
2006-03-20 19:01 ` Rodrigo Rosenfeld Rosas
2006-03-21 17:57 ` Philippe Gerum
2006-03-15 13:34 ` Gilles Chanteperdrix
2006-03-15 16:50 ` Jan Kiszka
2006-03-16 15:26 ` Gilles Chanteperdrix
2006-03-17 1:16 ` Jan Kiszka
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=44184CEA.2000901@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=stephane.fillod@domain.hid \
--cc=xenomai@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.