From: Philippe Gerum <rpm@xenomai.org>
To: "Steve M. Robbins" <steve@sumost.ca>
Cc: Xenomai@xenomai.org
Subject: Re: [Xenomai] Message Pipe services behaviour
Date: Mon, 03 Nov 2014 09:18:53 +0100 [thread overview]
Message-ID: <54573A6D.1030201@xenomai.org> (raw)
In-Reply-To: <6071747.2uXMl1ZSO0@riemann>
On 11/02/2014 01:53 AM, Steve M. Robbins wrote:
> On November 1, 2014 10:54:39 AM Philippe Gerum wrote:
>> Perhaps the rt side sends a large burst of data once in a while causing
>> the overflow? In this case, you could not detect the issue looming from
>> the nrt side until it happens, since the rt side has higher priority
>> (i.e. rt would cause ENOMEM even before nrt had a chance to resume
>> execution).
>
> OK, I understand the theory. However, I don't believe that is my case. The
> message queue is transporting fault information and through user actions I can
> set it up to send 2 messages per cycle and using the FIFO code, the nrt side
> is indeed reading 2 messages. Using message queues, I can see that there are
> multiple messages outstanding but it reads only one.
>
Ok, so if no message gets lost, if you can see FIONREAD increase until
ENOMEM is raised, and if throttling the rt side only delays the issue
without solving it, the only explanation would be that a notification of
input availability is lost by the poll handler backing select() in the
rt-pipe driver. That would cause the messages to pile up on the rt side,
with too few deliveries to nrt.
Only for the purpose of checking this, could you try read()ing the large
message queue directly, then in a second attempt, enabling SIGIO on the
rtp fildes to get the messages asynchronously, instead of sensing them
via select()? The idea would be to check whether getting rid of select()
improves the situation.
NOTE: I'm assuming that the rt side only uses rt_pipe_write(), and never
rt_pipe_stream() which does packet coalescence by design.
--
Philippe.
next prev parent reply other threads:[~2014-11-03 8:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 16:11 [Xenomai] Message Pipe services behaviour Steve M. Robbins
2014-10-29 17:30 ` Philippe Gerum
2014-10-31 20:00 ` Steve M. Robbins
2014-11-01 9:54 ` Philippe Gerum
2014-11-02 0:53 ` Steve M. Robbins
2014-11-03 8:18 ` Philippe Gerum [this message]
2014-11-03 15:59 ` Steve M. Robbins
2014-11-03 16:29 ` Philippe Gerum
2014-11-03 18:37 ` Steve M. Robbins
2014-11-03 20:01 ` Philippe Gerum
2014-11-03 20:03 ` Gilles Chanteperdrix
2014-11-03 20:18 ` Philippe Gerum
2014-11-03 22:22 ` Steve M. Robbins
2014-11-03 8:54 ` dietmar.schindler
2014-11-03 9:08 ` 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=54573A6D.1030201@xenomai.org \
--to=rpm@xenomai.org \
--cc=Xenomai@xenomai.org \
--cc=steve@sumost.ca \
/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.