All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Eric Eric <ericrebates@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] FAQ, context switch latency
Date: Sat, 23 Apr 2011 23:41:47 +0200	[thread overview]
Message-ID: <4DB3479B.20609@domain.hid> (raw)
In-Reply-To: <BANLkTim3Z6v5Jr+O8197WZZAOpHsPwjwPA@mail.gmail.com>

Eric Eric wrote:
> Hello, I've asked a lot of questions here and gotten very prompt and helpful
> responses, so I summarized them in a FAQ since I figure others may have
> similar questions.  See http://ericrebates.zzl.org/xen_faq.txt .  If this
> seems useful maybe someone can append them to the end of the wiki FAQ.

I am not sure all questions really are really that frequent, but yes, we
should add some to the FAQ. Would you be willing to do it? If yes, I
will give you write access to the wiki.

> 
> On another note, I have been comparing Xenomai's context switch latency to
> GHS Integrity.  I found that on average Xenomai seems to take three times as
> long to context switch versus Integrity (12uS vs. 4uS) running almost
> identical test code.  Does anyone know why this may be or how to reduce this
> latency in Xenomai?  Since it appears Gilles helped implement the fast
> context switching extension for the Linux kernel, I'm assuming Xenomai is
> also taking advantage of this extension.

I assume you are measuring context switch times in kernel-space, then
FCSE will not help you, FCSE helps for MMU context switches. And if you
are testing on omap3, FCSE is not implemented for omap3. Do you have
unlocked context switch enabled ?
What I-pipe patch version are you using?

You can probably reduce a bit the time by using rt_timer_tsc() or even
xnarch_get_cpu_tsc() to do the measurements, then rt_timer_tsc2ns after
the second measurement, but I am afraid you will not go as low as 4us.
You can also try and enable the I-pipe tracer to see where the time is
spent, but beware of the time dilation...

-- 
                                                                Gilles.


  reply	other threads:[~2011-04-23 21:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23 21:17 [Xenomai-help] FAQ, context switch latency Eric Eric
2011-04-23 21:41 ` Gilles Chanteperdrix [this message]
2011-04-25 15:23   ` Eric Eric
2011-04-25 15:35     ` Gilles Chanteperdrix
2011-06-15 17:36     ` 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=4DB3479B.20609@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=ericrebates@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.