All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Jeff Webb <jeff.webb@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] max size for pipes and rt-fifos?
Date: Thu, 07 Sep 2006 11:23:21 +0200	[thread overview]
Message-ID: <44FFE509.3090009@domain.hid> (raw)
In-Reply-To: <44FF3A22.5060901@domain.hid>

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

Jeff Webb wrote:
> Here are a couple of questions that I hope someone can answer:
> 
> It appears that the maximum pipe size that can be created using
> rt_pipe_create() is 16 MB.  Is this correct?  If so, what is the cause
> of this limitation, and are there any work-arounds?  I am using a 128 MB
> FIFO in my rtlinux simulation.  Any ideas on how I can port this?

Maybe it's a 2.4-related issue (my 2.4 setup is broken, can't test). On
a 2.6.17 kernel I face no problems allocating far larger rt_pipes.

> 
> It appears that the maximum size for RT-FIFOs created with the rtai
> skin's rtf_create() is much less than 16 MB.  It's hard to quantify,
> since the errors are given at FIFO write time, and not creation time,
> but it appears to be around 100 kB or so.  Why is this not the same as
> for rt_pipe_create()?  Also, why is the memory allocation not done at
> creation time?  It looks like the memory allocation is done on the first
> rtf_put() -- which is called from my real-time thread!  I assumed the
> memory allocation would be a non-realtime operation.  (It also appears
> that I am getting some kind of memory leak when the memory allocation
> fails, because I can not allocate as much memory the next time around. 
> I am cleaning up the FIFO with rtf_destroy, so I don't know what I could
> be doing wrong...)

RTAI FIFO allocate their buffers from the real-time system heap, and
that on is 128 KB by default (see kernel config).

Allocation in Xenomai pipes works differently, i.e. always on some
real-time heap. We stumbled over this as well when applying it the first
time. To get larger pools and decouple them from the system heap, we
introduced separated heaps for rt_pipes afterwards. So, as long as your
usage pattern of a particular rt_pipe is deterministic, you can predict
the success of data transfers.

The potential leak you found needs to be examined. Could you post a
simple test that demonstrate it?

Jan


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

  reply	other threads:[~2006-09-07  9:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-06 21:14 [Xenomai-help] max size for pipes and rt-fifos? Jeff Webb
2006-09-07  9:23 ` Jan Kiszka [this message]
2006-09-07 19:53   ` Jeff Webb
2006-09-08  6:55     ` Jan Kiszka
2006-09-11 20:03       ` Jeff Webb
2006-09-11 20:49         ` Gilles Chanteperdrix
2006-09-11 22:29           ` Jan Kiszka
2006-09-12 11:29             ` Gilles Chanteperdrix
2006-09-08 13:59     ` Philippe Gerum
2006-09-09 16:05       ` Philippe Gerum
2006-09-11 20:29         ` Jeff Webb
2006-09-11 21:15           ` 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=44FFE509.3090009@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=jeff.webb@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.