From: Philippe Gerum <rpm@xenomai.org>
To: Filip Van Rillaer <Filip.VanRillaer@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] uClinux write to pipe returning -ENOMEM
Date: Fri, 22 Aug 2008 20:21:20 +0200 [thread overview]
Message-ID: <48AF03A0.9000909@domain.hid> (raw)
In-Reply-To: <406CC9939904F143B9D42CEEA3E56E56431FCD@oab1mx1.oneaccess.intra>
Filip Van Rillaer wrote:
> Hello,
>
> My current test-setup is as follows:
> 1) user-program reads test-samples from a file in non-RT and does a blocking write to the Xenomai-pipe
> 2) a RT-program that implements a V34 modem is listening to the Xenomai-pipe and will send the data over a telephone line.
> ---> so it is the intention that at startup the Xenomai-pipe buffer gets filled up and from than in stationary state the data should stream at the speed of the V34 modem connection.
>
> The RT-side is using rt_pipe_monitor to be warned when new data from the non-RT write arrives (so no polling). The RT-side will 'remember' that data from the non-RT side are available and (sometimes a lot) later when enough data have been sent over the telephone line, read new data from the Xenomai pipe.
>
> Any idea how I can get around this problem?
>
> Concerning O_SYNC I get the fatal error message:
> Xenomai: fatal: inserting element twice, holder=00b19cfc, qslot=00b1ab84 at kernel/xenomai/nucleus/pipe.c:96
> CPU PID PRI TIMEOUT STAT NAME
> > 0 0 -1 0 00400080 ROOT
> 0 112 99 999616310 00300186 RTTask
> I think that this happens around the same time that I get the -ENOMEM when I am not using the O_SYNC flag.
>
Fixed in both the -devel and maintenance branches.
> Best regards,
> Filip
>
>
> -----Original Message-----
> From: Philippe Gerum [mailto:rpm@xenomai.org]
> Sent: 19 August 2008 18:31
> To: Filip Van Rillaer
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai-help] uClinux write to pipe returning -ENOMEM
>
> Filip Van Rillaer wrote:
>> Hello,
>>
>> I am opening the uClinux side of a Xenomai pipe like (so in blocking mode):
>> FdPipe = open(PipeName, O_RDWR);
>> After some writes to FdPipe I get the returnvalue -ENOMEM.
>> I can understand that the internal buffer gets full as my application
>> is writing data faster than the Xenomai side is consuming, but I don't
>> expect to see a returnvalue -ENOMEM : the calling writing-thread
>> should block, isn't it? Please comment.
>>
>
> RT is assumed to consume asap and will preempt the non-RT write() caller immediately upon data receipt, unless the RT code uses some kind of timed polling, which is considered useless and inefficient, since you can ask a RT thread to wait for incoming data in a blocking way.
>
>> (When adding the O_SYNC flag things get even worse)
>>
>
> That is the point that would actually need fixing: what happens with O_SYNC, what is worsening exactly?
>
>> Why is the code for xnpipe_write saying:
>> if (!mh)
>> /* Cannot sleep. */ <--- ???????????????????
>> return -ENOMEM;
>>
>> I am using svn version 4105.
>>
>> Best regards,
>> Filip
>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
>
>
> --
> Philippe.
>
--
Philippe.
prev parent reply other threads:[~2008-08-22 18:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 16:21 [Xenomai-help] uClinux write to pipe returning -ENOMEM Filip Van Rillaer
2008-08-19 16:31 ` Philippe Gerum
[not found] ` <406CC9939904F143B9D42CEEA3E56E56431FCD@oab1mx1.oneaccess.intra>
2008-08-20 9:47 ` Philippe Gerum
2008-08-20 10:16 ` Philippe Gerum
2008-08-20 15:04 ` Filip Van Rillaer
2008-08-20 17:00 ` Philippe Gerum
2008-08-20 17:06 ` Philippe Gerum
2008-08-20 19:08 ` Philippe Gerum
2008-08-21 11:08 ` Filip Van Rillaer
2008-08-22 18:20 ` Philippe Gerum
2008-08-25 6:30 ` Filip Van Rillaer
2008-08-22 18:21 ` Philippe Gerum [this message]
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=48AF03A0.9000909@domain.hid \
--to=rpm@xenomai.org \
--cc=Filip.VanRillaer@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.