From: Jan Kiszka <jan.kiszka@domain.hid>
To: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] RTDM and Timer functions
Date: Tue, 14 Mar 2006 00:05:41 +0100 [thread overview]
Message-ID: <4415FAC5.7050608@domain.hid> (raw)
In-Reply-To: <200603131631.26195.lbocseg@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2912 bytes --]
Rodrigo Rosenfeld Rosas wrote:
> Em Segunda 13 Março 2006 15:33, Jan Kiszka escreveu:
>
>> Rodrigo Rosenfeld Rosas wrote:
>>> Em Segunda 13 Março 2006 14:25, Gilles Chanteperdrix escreveu:
>>>> Jan Kiszka wrote:
>>>>>> Sometimes the result is "Should be near 84000: 100000", that is kind of
>>>>>> correct, since the tickval is 100000, although I think that those
>>>>>> functions in the RTDM driver context should be independent of the tick
>>>>>> value set by the user program... Maybe using oneshot in the driver
>>>>>> calls and periodic in the application... I really don't know what would
>>>>>> be the best approach here...
>>>>> rtdm_clock_read always uses the nucleus clock. Using something different
>>>>> (e.g. always TSC) would break applications specifying absolute times
>>>>> derived from the return values of other skins' functions.
>>>> Maybe adding a service to RTDM would allow users to measure short time
>>>> intervals with RTDM using the TSC ?
>>>>
>>>> The native (rt_timer_tsc()) and posix (clock_gettime(CLOCK_MONOTONIC))
>>>> skins have a way to do this.
>>> This would fit great for my needs (and most developers I think)!
>> Will think about it. Actually, I'm not a big fan of this. It creates the
>> risk that someone feeds the output of this service into (incompatible)
>> timed RTDM services.
>
> Sorry, I couldn't see a practical usage of this. Could you give an example?
>
>> Even worse, this would work for aperiodic mode but fail for periodic.
>
> Actually it is only necessary on periodic modes as it already works for
> aperiodic mode.
>
>> We would definitely need a good name for it,
>> rtdm_clock_read_ex(<clock-id>), rtdm_clock_read_tsc(),
>> rtdm_clock_read_monotonic()? I'm not going to break rtdm_clock_read() by
>> adding an argument (otherwise, I would have to fix too many drivers on
>> my own... :-/).
>
> That is the idea, I think. I agree that rtdm_clock_read() should be kept as it
> is (the API/definition). No body is asking you to change it. Adding
> rtdm_clock_read_tsc() would be sufficient in my opinion whilst it maintain
> coherency with other skins.
Thinking about this more thoroughly, a few questions popped up for me:
o When we call it rtdm_clock_read_tsc(), we should actually return the
raw TSC values, shouln't we? But then we also need conversion
functions (rtdm_clock_tsc2ns, rtdm_clock_ns2tsc). Or should we always
convert to nanoseconds on return? POSIX and Native are different in
this regard.
o What would be the core rationale behind it, having a high-resolution
time stamp? What are the primary use cases? I'm asking for this so
that I can clearly differentiate between this new service and the
existing one in the docs. Also, giving an abstract description would
leave more options to the actual implementation on other archs or
platforms.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next prev parent reply other threads:[~2006-03-13 23:05 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 17:43 [Xenomai-core] RTDM and Timer functions Rodrigo Rosenfeld Rosas
2006-03-09 20:33 ` Jan Kiszka
2006-03-10 13:54 ` Rodrigo Rosenfeld Rosas
2006-03-10 18:32 ` Jan Kiszka
2006-03-10 20:00 ` Rodrigo Rosenfeld Rosas
2006-03-13 11:48 ` Jan Kiszka
2006-03-13 14:54 ` Rodrigo Rosenfeld Rosas
2006-03-13 17:15 ` Rodrigo Rosenfeld Rosas
2006-03-13 17:58 ` Rodrigo Rosenfeld Rosas
2006-03-13 18:24 ` Jan Kiszka
2006-03-13 19:25 ` Rodrigo Rosenfeld Rosas
2006-03-13 19:19 ` Rodrigo Rosenfeld Rosas
2006-03-15 4:44 ` Jim Cromie
2006-03-13 18:12 ` Jan Kiszka
2006-03-14 1:28 ` Rodrigo Rosenfeld Rosas
2006-03-13 17:25 ` Gilles Chanteperdrix
2006-03-13 17:31 ` Rodrigo Rosenfeld Rosas
2006-03-13 18:33 ` Jan Kiszka
2006-03-13 19:31 ` Rodrigo Rosenfeld Rosas
2006-03-13 23:05 ` Jan Kiszka [this message]
2006-03-14 1:36 ` Rodrigo Rosenfeld Rosas
2006-03-14 6:44 ` Jan Kiszka
2006-03-14 14:27 ` Rodrigo Rosenfeld Rosas
2006-03-14 16:46 ` Jan Kiszka
2006-03-14 16:59 ` Rodrigo Rosenfeld Rosas
2006-03-14 18:45 ` Rodrigo Rosenfeld Rosas
2006-03-14 19:00 ` Jan Kiszka
2006-03-14 19:40 ` Rodrigo Rosenfeld Rosas
2006-03-14 20:29 ` Jan Kiszka
2006-03-14 22:32 ` Rodrigo Rosenfeld Rosas
2006-03-14 22:51 ` Jan Kiszka
2006-03-15 0:31 ` Rodrigo Rosenfeld Rosas
2006-03-15 13:06 ` Philippe Gerum
[not found] ` <44167BE9.2090703@domain.hid>
2006-03-14 10: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=4415FAC5.7050608@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=lbocseg@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.