discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] shmat issue


From: Philip Balister
Subject: Re: [Discuss-gnuradio] shmat issue
Date: Wed, 20 Oct 2010 14:30:12 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Thunderbird/3.1.4

On 10/20/2010 01:49 PM, Eric Blossom wrote:
On Wed, Oct 20, 2010 at 01:02:15PM -0400, Philip Balister wrote:
On 10/19/2010 10:51 PM, Eric Blossom wrote:
OK, it looks like x86 sets SHMLBA to PAGE_SIZE and arm uses 4 *
PAGE_SIZE. Need to puzzle through this a little more. This is the
failing check in the kernel.

OK.  What's PAGE_SIZE on arm?

PAGE_SIZE is still 4096, there is an additional restriction on the address passed to shmat().


I wonder how we can determine the actual value of SHMLBA at runtime?
We currently use the result of gr_pagesize() as the required alignment value.

It looks to me like the there are several shm sections created, with varying access rights. Then shmat is used to reserve a chunk of memory. Then the sections created first are attached to with addresses based on the result of the shmat used to get the address space.

The weird thing on arm, the shmat returns a page aligned section, but if you pass that address back to shmat it fails, because that address needs to be aligned to SHMLBA (found in arch/arm|x86/include/asm/shmparam.h.

What does it mean?

Well gnuradio falls back to a mmap approach to get the circular buffer. It is a bigger problem for kalibrate, which just fails.

I'm not sure who is to blame :) Is there another way to get reserve the memory on you process to use when you attach the shared memory segments?

Philip



reply via email to

[Prev in Thread] Current Thread [Next in Thread]