From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jeroen Van den Keybus <jeroen.vandenkeybus@gmail.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] rtdm_clock_read overhead/accuracy question
Date: Wed, 18 Nov 2015 17:22:06 +0100 [thread overview]
Message-ID: <20151118162206.GA27240@hermes.click-hack.org> (raw)
In-Reply-To: <CAPRPZsDn9AFciNrBESG8Tn8oWwEeQ78Hzrnd0E0rknrjY1C+WQ@mail.gmail.com>
On Wed, Nov 18, 2015 at 03:38:38PM +0100, Jeroen Van den Keybus wrote:
> >>
> >> Is that realistic?
> >
> > This seems to be a lot.
>
> It looks quite long, yes, for what should essentially be an RDTSC instruction.
rtdm_clock_read does more than calling rdtsc, it calls rdtsc then
converts the result from tsc counts to nanoseconds, which is not
negligible compared to the time for rdtsc.
>
> Why not test without the sleep and compare two back-to-back
> rtdm_clock_read()s to make sure that you're not measuring jitter from
> the sleep function ?
rtdm_task_busy_sleep does not sleep, it reads the tsc and wait for it
to reach a known value. So, there should be little jitter involved.
Maybe the difference comes from some difference in the time
conversion routines involved ?
--
Gilles.
https://click-hack.org
next prev parent reply other threads:[~2015-11-18 16:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 13:34 [Xenomai] rtdm_clock_read overhead/accuracy question JK.Behnke
2015-11-18 13:52 ` Gilles Chanteperdrix
2015-11-18 14:36 ` JK.Behnke
2015-11-18 16:24 ` Gilles Chanteperdrix
2015-11-18 17:11 ` JK.Behnke
2015-11-18 17:57 ` Gilles Chanteperdrix
2015-11-18 14:38 ` Jeroen Van den Keybus
2015-11-18 16:03 ` JK.Behnke
2015-11-18 16:22 ` Gilles Chanteperdrix [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-19 8:09 JK.Behnke
2015-11-19 8:55 ` Gilles Chanteperdrix
2015-11-19 10:34 ` JK.Behnke
2015-11-19 20:21 ` Gilles Chanteperdrix
2015-11-20 6:44 ` JK.Behnke
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=20151118162206.GA27240@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jeroen.vandenkeybus@gmail.com \
--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.