From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Eric Noulard <eric.noulard@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] memcpy performance on Xenomai
Date: Wed, 16 May 2007 22:17:28 +0200 [thread overview]
Message-ID: <17995.26328.303873.229987@domain.hid> (raw)
In-Reply-To: <cbe23c50705151326v5ce31bcbie877828121059de9@domain.hid>
Eric Noulard wrote:
> 2007/5/15, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
> > Daniel Schnell wrote:
> > > The reason I was looking at the memcpy native performance was because I found Xenomai Posix message queues somewhat slow:
> > > In two tasks where one is receiving a 32 kBytes msg and the other sending to this task 32 kbytes of data, I have an average cycle time of more than 1 ms.
> > > Looking at the memcpy performance of my system tells me something:
> > > Memcpy(32 KB) -> 400 us
> > > Two msg_send(32KB) cannot be less than 2x400 us + 2 ctx switch away, probably even more because we have to write first to Kernel memory, then the ctx switch, then copying from Kernel memory to user buffer, than ctx switch. This simply means I cannot use msg queues for anything bigger than 1K, which means I have to use shared memory for that.
>
> Are your 2 tasks in user-space or 1 in user 1 in kernel?
>
> > so it is probably better to use message queues to pass pointers to a
> > shared memory region, allowing zero copies.
>
> I was about to say just the same but before developing my idea
> I have xenomai question:
> Are the share memory region obtained by shm_open
> shareable between kernel task and user task just like
> rt_heap_create/rt_heap_alloc does (read from the doc).
Well, if you found rt_heaps doc, it would have been easy to have a look
at posix shared memory doc as well... Anyway, yes, on platforms where
sharing a memory area between kernel space and user-space is not a
problem, posix shared memory are shareable. On ARM, it is a no go
because of the cache architecture.
--
Gilles Chanteperdrix.
next prev parent reply other threads:[~2007-05-16 20:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 15:59 [Xenomai-help] memcpy performance on Xenomai Fillod Stephane
2007-05-15 16:59 ` Daniel Schnell
2007-05-15 18:03 ` Gilles Chanteperdrix
2007-05-15 20:26 ` Eric Noulard
2007-05-16 20:17 ` Gilles Chanteperdrix [this message]
2007-05-16 20:34 ` Eric Noulard
-- strict thread matches above, loose matches on Subject: below --
2007-05-15 11:38 Daniel Schnell
2007-05-15 12:16 ` Gilles Chanteperdrix
2007-05-15 14:40 ` Daniel Schnell
2007-05-15 14:50 ` Gilles Chanteperdrix
2007-05-15 15:28 ` Daniel Schnell
2007-05-15 15:41 ` Gilles Chanteperdrix
2007-05-15 17:54 ` Eric Noulard
2007-05-16 6:36 ` M. Koehrer
2007-05-15 15:18 ` 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=17995.26328.303873.229987@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=eric.noulard@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.