From: Bob Feretich <bob.feretich@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>,
Philippe Gerum <rpm@xenomai.org>,
xenomai@xenomai.org
Subject: Re: [Xenomai-help] Shared memory between a Xenomai user task and a standard Linux process?
Date: Mon, 02 Aug 2010 13:52:07 -0700 [thread overview]
Message-ID: <4C572FF7.5090200@domain.hid> (raw)
In-Reply-To: <4C5706E9.50101@domain.hid>
Thank you for the solution. Using Linux shm shared memory should have
been obvious. :-[
I was still thinking of Xenomai user tasks as running in a walled of
environment. I've got to remember that when a rt user task is in
secondary mode it has full access to Linux facilities.
When my rt user task starts and ends it is in secondary mode. It can
easily shmat() and shmdt() during these start and end periods.
As Philippe states, I just need to be careful about the synchronization
method I use. The Linux process must never be able to block the rt task.
(If the rt task wraps the buffer, we'll just throw away the history data
until space becomes available and report a "data overrun" on the next
block written.) As I said before, the buffer should be large enough so
that never happens anyway.
Yes, I am using the OMAP3 chip so the D-cache is VIPT, therefore shared
memory operations should not cause cache flushes to prevent aliasing.
Regards,
Bob Feretich
On 8/2/2010 10:56 AM, Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
>> On Mon, 2010-08-02 at 08:01 +0200, Gilles Chanteperdrix wrote:
>>> Due to their limitations on ARM platform (they are uncached on pre-v6
>>> ARMs), RT_HEAP should more be reserved to communications between
>>> user-space tasks and kernel-space tasks on these platforms. For
>>> communications between two user-space processes, using plain Linux
>>> shared memories is recommended.
>>>
>> ARM VIVT caching kills common sense. Note that in the particular case of
>> a rt / non-rt communication, standard shm would imply priority inversion
>> induced by heavyweight synchronization between rt senders and non-rt
>> receivers, so that would not fly that well. This is still possible to
>> use a lockless approach to queue data though. YMMV.
> Well, in fact, with the native API, you have the choice to use cached or
> non-cached heaps. So, if you know the heap will be used only by
> user-space applications, you can keep the heap cached, and forgot what I
> said. And Bob uses an OMAP3 anyway if I am not mistaken, so he has a
> shiny VIPT cache.
>
next prev parent reply other threads:[~2010-08-02 20:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 2:06 [Xenomai-help] Shared memory between a Xenomai user task and a standard Linux process? Bob Feretich
2010-08-02 5:42 ` Philippe Gerum
2010-08-02 6:01 ` Gilles Chanteperdrix
2010-08-02 17:38 ` Philippe Gerum
2010-08-02 17:56 ` Gilles Chanteperdrix
2010-08-02 20:52 ` Bob Feretich [this message]
2010-08-02 21:52 ` 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=4C572FF7.5090200@domain.hid \
--to=bob.feretich@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=rpm@xenomai.org \
--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.