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: Wolfgang Mauerer <wm@domain.hid>,
	"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Realtime gettimeofday()
Date: Wed, 02 Dec 2009 16:16:39 +0100	[thread overview]
Message-ID: <4B1684D7.2080501@domain.hid> (raw)
In-Reply-To: <4B1681DA.3090108@domain.hid>

Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> Gilles Chanteperdrix wrote:
>>> Jan Kiszka wrote:
>>>> Why? It delivers us the core mechanism we need for the rest as well -
>>>> and it does not require fancy I-pipe hooks.
>>> Because relying on the vdso/vsyscall only works on x86. Whereas
>>> implementing clock slew down/acceleration at nucleus level and simply
>>> sharing data between kernel and user through the the global sem heap,
>>> works for all architectures.
>> There are three kind of archs:
>>  - those that already support vgettimeofday & friends (x86, powerpc,
>>    maybe more)
>>  - those that do not yet though they could (I strongly suspect arm falls
>>    into this category as well)
>>  - those that never will (due to lacking user-readable time sources)
>>
>> We need temporary/permanent i-pipe workarounds for the last two, but I
>> see no point in complicating the first category. This design aims at a
>> longer term.
> 
> Well, I may be wrong, but I prefer generic code to arch-specific code.
> Nucleus code to handle clock slow down/acceleration would be generic;
> I-pipe code to signal NTP syscalls would be generic (and yes, even if
> I-pipe patches are generated for all architectures, whether the code is
> generic or specific makes a big difference);
> User-space code to implement clock_gettime(CLOCK_REALTIME) using data
> shared through the global sem heap would be generic.
> 
> So, I think this design is future proof and easy to maintain. And I do
> not see how it complicates x86 situation, since it is only made of
> generic code.

Well, OK, then place a small optional I-pipe hook into that part that
normally writes the update into the vdso page (I think that is
arch-specific anyway), replicating it into a specified page the nucleus
may set up on a globally shared heap. That hook also has to maintain a
seqlock like Linux does, ie. generating the same layout and semantics.
It's just the transport mechanism, we can easily select it based on the
arch's level of support.

But I'm against any needless redirection through the nucleus (including
potential nklocks etc.).

> 
> Looks like we found a troll to occupy this afternoon :-).
> 

Yeah, would be a nice one if there weren't that qemu-kvm migration
issues I have to trace down in parallel... :)

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


  reply	other threads:[~2009-12-02 15:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 12:55 [Xenomai-core] Realtime gettimeofday() Wolfgang Mauerer
2009-12-02 13:23 ` Gilles Chanteperdrix
2009-12-02 13:43   ` Jan Kiszka
2009-12-02 14:15     ` Gilles Chanteperdrix
2009-12-02 14:31       ` Jan Kiszka
2009-12-02 14:35         ` Gilles Chanteperdrix
2009-12-02 14:55           ` Jan Kiszka
2009-12-02 15:03             ` Gilles Chanteperdrix
2009-12-02 15:16               ` Jan Kiszka [this message]
2009-12-02 16:08                 ` Gilles Chanteperdrix
2009-12-02 16:23                   ` Jan Kiszka
2009-12-02 16:59                     ` Gilles Chanteperdrix
2009-12-02 20:54                       ` Gilles Chanteperdrix
2009-12-02 22:03                         ` Wolfgang Mauerer
2009-12-02 22:20                           ` Gilles Chanteperdrix
2009-12-02 22:33                             ` Gilles Chanteperdrix
2009-12-03  9:36                             ` Wolfgang Mauerer
2009-12-03 10:50                               ` Gilles Chanteperdrix
2009-12-03 13:11                                 ` Wolfgang Mauerer
2009-12-03 13:14                                   ` Gilles Chanteperdrix
2009-12-03 13:32                                     ` Wolfgang Mauerer
2009-12-03 13:38                                       ` Gilles Chanteperdrix
2009-12-03 20:31                                         ` Wolfgang Mauerer
2009-12-03 21:42                                           ` Gilles Chanteperdrix
2009-12-05 16:11                                             ` Philippe Gerum
2009-12-07  9:14                                               ` Jan Kiszka
2009-12-07 13:43                                                 ` Gilles Chanteperdrix
2009-12-07 13:50                                                   ` Jan Kiszka
2009-12-07 14:07                                                   ` Philippe Gerum
2009-12-07 14:21                                                     ` Wolfgang Mauerer
2009-12-15 15:00   ` Richard Cochran
2009-12-15 15:07     ` Gilles Chanteperdrix

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=4B1684D7.2080501@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=wm@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.