All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Petr Cervenka <grugh@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rt_pipe and rt_queue problems
Date: Wed, 02 Aug 2006 21:04:14 +0200	[thread overview]
Message-ID: <44D0F72E.3020406@domain.hid> (raw)
In-Reply-To: <200608021808.18076@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

Petr Cervenka wrote:
> I have Xenomai snapshot (18.5.2006,  2.1.1 ~ 2.1.2) and userspace 
> application. I need to exchange lot of data between two tasks 
> (producer -> consumer) with some buffer in the middle. I used 
> rt_pipe/linux device scheme, but I realised that the preformance is 
> very low. (At least some performance monitor showed it)

Could you elaborate on this? Does the performance monitor (which one?)
tell you more details? What is the characteristic of your transferred
data (size, frequency)?

> So I tried to use rt_queue. But when I tried to read from queue with
> timeout (or TM_INFINITE), I got an EPERM error. That means: "service
> should block, but was called from a context, which cannot sleep.".
> But I want to sleep (and wait for new data). Where is the problem? Do
> you have any advice?

Is the read of the queue a Xenomai thread? It has to be, even if it will
mostly run in secondary (Linux) mode. Check also /proc/xenomai/sched
when you think it should be.

Maybe what you really want is shared memory between producer and
consumer. If the consumer is mapped to Xenomai, you can even use normal
synchronisation (mutexes/semaphores) to control the access - or design
something lock-less.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-08-02 19:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 16:08 [Xenomai-help] rt_pipe and rt_queue problems Petr Cervenka
2006-08-02 19:04 ` Jan Kiszka [this message]
2006-08-03 14:28   ` Petr Cervenka
2006-08-03 18:01     ` Philippe Gerum
2006-08-03 21:35     ` Jan Kiszka
2006-08-04 11:45       ` Petr Cervenka
2006-08-05 16:50         ` Jan Kiszka
2006-08-05 17:40           ` Philippe Gerum
2006-08-07 13:03             ` Dmitry Adamushko
2006-08-07 13:37               ` Jan Kiszka
2006-08-07 14:05                 ` Philippe Gerum
2006-08-07 14:23                   ` Dmitry Adamushko

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=44D0F72E.3020406@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=grugh@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.