All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [PATCH-STACK] Synchronised timebases and more
Date: Wed, 20 Jun 2007 23:57:01 +0200	[thread overview]
Message-ID: <4679A2AD.5050102@domain.hid> (raw)
In-Reply-To: <18041.38156.744377.601270@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 2298 bytes --]

Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>  > I was afraid you would insist on this support. ;)
> 
> Well, clock_settime is almost the only service missing in posix skin,
> and since I saw in Thomas Gleixner slides that one reason for not using
> Xenomai is that its posix support is incomplete, I am eager to implement

Well, those slides are from a time when Thomas already made up his plans
(I watched his first LibeRTOS presentation in 2003...).

> the missing services (and to remove the sentence "xenomai posix skin is
> a work in progress" from posix skin text file).

Anyway, your goal is valid.

> 
>  > 
>  > There are two ways to implement this:
>  > 
>  >  A) The poor man's variant
>  > 
>  >     On xntbase_adjust_time() (the code will change again, pay attention!
>  >     ;) ), iterate over all pending timers (or over all timers in the
>  >     base that POSIX uses?) and fix those which do not have the recently
>  >     introduced XNTIMER_MONOTONIC flag set. "Poor man" because it's
>  >     simple, but it scales poorly.
>  > 
>  >  B) The scalable but complex one
>  > 
>  >     Introduce a second time base for each existing one (or for the one
>  >     that POSIX uses?), put in all the adjustable (realtime) timers. We
>  >     then only need to play with the base's clock offset on adjustment,
>  >     but we would also have to include that offset into timeout
>  >     considerations inside the timer interrupt handler.
>  > 
>  > I wonder now if the number of use cases where people are playing with
>  > the wallclock all over the time while a significant amounts of timers
>  > are pending is actually worth the troubles of B)... What do you think?
> 
> I think one use of clock_settime would be to resync Xenomai clock with
> Linux one from time to time, but even if we implemented B, that would be
> a bad idea because of the effect on timers. So, A would be enough for me.

For the resync with any kind of external time source, I rather have a
scheme of one set-time during startup + continuous clock frequency
tuning in mind. As you say, permanently playing with the offset is _bad_.

So only the question remains if we should apply the timer adjustment on
all bases or only the POSIX-related one.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2007-06-20 21:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-18  7:52 [Xenomai-core] [PATCH-STACK] Synchronised timebases and more Jan Kiszka
2007-06-18  8:27 ` Jan Kiszka
2007-06-20 16:42   ` Philippe Gerum
2007-06-20 17:08     ` Jan Kiszka
2007-06-20 22:29       ` Philippe Gerum
2007-06-21  7:58         ` Jan Kiszka
2007-06-21  9:06           ` Philippe Gerum
2007-06-21  9:17             ` Philippe Gerum
2007-06-21  9:21             ` Jan Kiszka
2007-06-21  9:39               ` Philippe Gerum
2007-06-21 18:10                 ` Gilles Chanteperdrix
2007-06-20 17:53     ` Gilles Chanteperdrix
2007-06-20 18:02       ` Gilles Chanteperdrix
2007-06-20 18:52       ` Jan Kiszka
2007-06-20 20:58         ` Gilles Chanteperdrix
2007-06-20 21:57           ` Jan Kiszka [this message]
2007-06-20 22:40         ` Philippe Gerum
2007-06-20 22:45       ` 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=4679A2AD.5050102@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.