All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Roderik.Wildenburg@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rt_queue_write error: "Cannot allocate memory "; bug or feature ?
Date: Mon, 19 Nov 2007 19:06:36 +0100	[thread overview]
Message-ID: <4741D0AC.40308@domain.hid> (raw)
In-Reply-To: <5D63919D95F87E4D9D34FF7748CE2C2AE09170@domain.hid>

Roderik.Wildenburg@domain.hid wrote:
> 
> But the allocated block keeps bounded to a spezial block size and if
> some other
> blocksize is needed an other block is alloctated ?
>

No more than one block is allocated at any given time in your example.
This is expected due to the priority scheme your test undergoes. In any
case, 282 bytes (+ a few bytes message header) should grab one 512-byte
buffer here. For anything below the size of a logical page (4k in
2.3.x), the allocator picks the next power of 2 greater or equal to the
requested size.

2.3.x is known to suffer a sub-optimal setting for the page size used in
various internal heaps which has been fixed in v2.4, sometimes leading
to a useless overhead caused by the heap's internal header. Still, in
your case, and even with a 10k setting, you should have two 4k pages
available, one being split in 8 x 512 byte blocks due to
rt_queue_write() queuing a 282-byte block. And no more than one block
among the eight available should be busy at any given time.

What if you don't set any limit to the queue elements, i.e. passing
Q_UNLIMITED instead of 10. Does this change the behaviour?

-- 
Philippe.


  reply	other threads:[~2007-11-19 18:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 13:43 [Xenomai-help] rt_queue_write error: "Cannot allocate memory "; bug or feature ? Roderik.Wildenburg
2007-11-19 14:35 ` Philippe Gerum
2007-11-19 15:11   ` Roderik.Wildenburg
2007-11-19 18:06     ` Philippe Gerum [this message]
2007-11-20  8:51       ` Roderik.Wildenburg
2007-11-20 13:59         ` Philippe Gerum
2007-11-21 14:07           ` Roderik.Wildenburg
2007-11-23 17:08           ` Philippe Gerum
2007-11-28  9:21             ` Roderik.Wildenburg
2007-11-28  9:43               ` Philippe Gerum
2007-11-28 10:05                 ` Roderik.Wildenburg
2007-11-28 10:22                   ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2007-11-28 13:03 Roderik.Wildenburg

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=4741D0AC.40308@domain.hid \
    --to=rpm@xenomai.org \
    --cc=Roderik.Wildenburg@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.