From: Jan Kiszka <jan.kiszka@domain.hid>
To: "M. Koehrer" <mathias_koehrer@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Xenomai and futexes - Native API optimized for user space only applications
Date: Wed, 09 May 2007 13:51:43 +0200 [thread overview]
Message-ID: <4641B5CF.80303@domain.hid> (raw)
In-Reply-To: <22908039.1178707932628.JavaMail.ngmail@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]
M. Koehrer wrote:
> Hi everybody,
>
> I am using Xenomai for a high performance real time simulation system.
> All of the simulation code is executed within user space. One application is running that consists
> of several Xenomai real time threads.
> For performance reasons I am always using the latest PC technology available (which is currently
> Pentium D or Core2Duo PCs, we are thinking even of using quad-core CPUs).
> There has to be a kind of thread synchronisation e.g. when accessing shared data.
> Hardware I/O is done via rtnet or via PCI I/O boards that work in user space aswell (PCI memory
> mapped into the user space).
> This is done e.g. by using semaphores, mutexes et.c
> I like the Xenomai-native skin as it provides a very clear API that is easy to use.
> However, for a user space only application it is a performance killer, that all API calls
> lead to a mode switch from user to kernel space. Each API call takes about 1-2 microseconds (us)
> on my PC which is really expensive.
> Especially when inter process communication is used to protect the access to shared data
> it is mostly the case that the calling thread does not have to wait. In this situation there is no
> need for a context switch. The API call did not lead to a rescheduling of the available tasks.
> And for this the required 1-2 us do really hurt.
>
> Thus my question/proposal is if there is a plan to use a "variant" of the native API that is optimized for
> user space only applications. In this case e.g. futexes can be used. If there is a need to
> reschedule to another task it is fine to "invest" the 2us but it can be avoided mostly which should
> increase the overall performance dramatically.
Your analysis is not wrong. But before going into any detail may I ask
you for on clarification: What do you want to optimise *primarily*, the
average execution time of your RT threads in order to gain more CPU time
for non-RT Linux jobs *or* the worst case execution time of your RT threads?
> This would lead to a library where a big part of the functionality is handled directly in the library
> (in user space). Currently the skin passes the (user space) API call via a Xenomai System call
> to the kernel space to execute there the actual functionality.
>
> Thanks for any feedback on this proposal.
>
> Regards
>
> Mathias
>
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-05-09 11:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-09 10:52 [Xenomai-help] Xenomai and futexes - Native API optimized for user space only applications M. Koehrer
2007-05-09 11:42 ` Dmitry Adamushko
2007-05-09 11:51 ` Jan Kiszka [this message]
2007-05-09 12:27 ` [Xenomai-help] Xenomai and futexes - Native API optimized for M. Koehrer
2007-05-09 12:51 ` Jan Kiszka
2007-05-09 13:35 ` Herman Bruyninckx
2007-05-09 13:58 ` M. Koehrer
2007-05-09 15:46 ` Jan Kiszka
2007-05-09 22:36 ` Herman Bruyninckx
2007-05-09 16:14 ` [Xenomai-help] Xenomai and futexes - Native API optimized for user space only applications Philippe Gerum
2007-05-09 16:32 ` Gilles Chanteperdrix
2007-05-10 8:31 ` [Xenomai-help] Xenomai and futexes - Native API optimized M. Koehrer
2007-05-10 9:26 ` Jan Kiszka
2007-05-10 13:02 ` M. Koehrer
2007-05-10 13:41 ` M. Koehrer
2007-05-10 16:21 ` Jan Kiszka
2007-05-10 9:46 ` Daniel Schnell
2007-05-10 15:16 ` Philippe Gerum
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=4641B5CF.80303@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=mathias_koehrer@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.