From: poornima r <rpoornar@domain.hid>
To: rpm@xenomai.org
Cc: adeos-main@gna.org, wg@domain.hid
Subject: Re: [Adeos-main] Domain switching latencies
Date: Fri, 22 Jun 2007 00:54:48 -0700 (PDT) [thread overview]
Message-ID: <487617.58719.qm@domain.hid> (raw)
In-Reply-To: <1182434536.9709.62.camel@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1923 bytes --]
Hello Philippe,
Thanks very much for the reply.
Thanks and Regards,
Poornima
Philippe Gerum <rpm@xenomai.org> wrote:
On Thu, 2007-06-21 at 05:59 -0700, poornima r wrote:
>
> We are very thankful to you for providing help and
> guidance in running latency testsuites and other
> assignments
> We are trying to measure context switching latencies
> between primary and secondary domains with changes in
> the
> latency code as specified in the below link
> http://www.mail-archive.com/xenomai@xenomai.org
>
> The following changes are done in the latency code and
> the applications are attached
> -------------------------------------------------------
> 1:Measured using linux call printf
> err = rt_task_wait_period(&ov);
> before = rt_timer_tsc();
> printf(" ");
You are measuring time for buffered I/O operations, so your measure is
fundamentally flawed, since this jump won't ever jump to kernel space
unless the buffer gets full once in a while, and the stdio layer has to
sync. At the very least, switch buffering off using setbuf(), give a
newline into the string (depends on underlying termio setup in effect,
so this is unreliable) or simply invoke an actual system call, like
getpgrp() or getppid (and _not_ getpid() which is optimized using direct
fetches from PTDs).
> after = rt_timer_tsc();
> dt = (long)(after - before);
> --------------------------------------------------------
> 2. Measure using Native API call
> err = rt_task_wait_period(&ov);
> before = rt_timer_tsc();
> rt_task_set_mode (T_PRIMARY, NULL, NULL);
> after = rt_timer_tsc();
> dt = (long)(after - before);
> ---------------------------------------------------------
> The worst case latencies was around 20 us using printf
> call and around 60 us when rt_task_set_mode was called
>
--
Philippe.
---------------------------------
Got a little couch potato?
Check out fun summer activities for kids.
[-- Attachment #2: Type: text/html, Size: 2497 bytes --]
prev parent reply other threads:[~2007-06-22 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 12:59 [Adeos-main] Domain switching latencies poornima r
2007-06-21 14:02 ` Philippe Gerum
2007-06-22 7:54 ` poornima r [this message]
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=487617.58719.qm@domain.hid \
--to=rpoornar@domain.hid \
--cc=adeos-main@gna.org \
--cc=rpm@xenomai.org \
--cc=wg@domain.hid \
/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.