From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Daniel Jacques (Alten)" <jacques.daniel@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] ARM interrupt latency
Date: Tue, 28 Apr 2009 18:59:48 +0200 [thread overview]
Message-ID: <49F73604.8070706@domain.hid> (raw)
In-Reply-To: <DF9F3A3C150B0646A17FF1487C1B6D5E019F64AA@rennsmail06.eu.thmulti.com>
Daniel Jacques (Alten) wrote:
> Hi all,
>
>
>
> I am using xenomai 2.3.4 on a product based on ARM1136.
>
> - I create several interrupt objects using "rt_intr_create" routine
> from user-space and their associated interrupt tasks that permanently
> wait for interrupt using "rt_intr_wait" routine.
>
> - The application contains also several user tasks to manage specific
> functionalities.
>
> - The processing in the interrupt tasks is very short: typically only
> resume the user task.
>
>
>
> By adding some embedded spies, I notice high latencies between
> interrupt task and user task (maximum 300µs, average 100µs).
>
> If I supposed inherent interrupt latency on ARM is around 30µs, I can
> explain the latency between interrupt task and user task by the
> important number of interrupts on my system (around 100 IRQ are
> generated in each period of 20ms). It means than only 5 or 6 IRQ at
> the same time can produced this effect ...
No the latency between interrupt and user task is due to the worst time
taken by a user-space context switch which, among other things contains
a full cache flush if you are using a VIVT cache. So, 300us is expected,
especially with Xenomai 2.3.4, which does not contain any of the
optimizations which have been done in this area. I think 30us is overly
optimistic too, interrupt latency is probably more around 50us.
In any case, Xenomai ships with a tool called "latency" which will help
you find the latency of your system. Actually, the first thing you
should do when testing Xenomai on a platform is run the latency test to
get the figures of Xenomai on your platform.
>
>
>
> So, first I'd like to have your opinion on this interpretation ...
>
> And in a second step, do you think that It could be interesting and
> especially sufficient in term of performance, to directly manage
> interrupt in kernel space instead of user space?
Yes, managing interrupt in kernel-space is not only good for latencies,
it is good for design. By forcing you to split your code between driver
code and user application, it will help you write future proof code,
instead of spaghetti code with driver and application intermixed.
>
> Additionally, if I choose this solution, should I publish the source
> code (as kernel and xenomai are under GPL)?
Well, under the terms of the GPL, anyone you distribute your system to
should have a way to get the sources, yes.
--
Gilles.
next prev parent reply other threads:[~2009-04-28 16:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 16:43 [Xenomai-help] ARM interrupt latency Daniel Jacques (Alten)
2009-04-28 16:59 ` Gilles Chanteperdrix [this message]
2009-04-29 6:52 ` Daniel Jacques (Alten)
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=49F73604.8070706@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jacques.daniel@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.