Forcing shared memory belor 4GB in 16GB system

Submitted by Anonymous
on June 13, 2008 - 8:44am

I am using a bus adapter to allow access from a VME system to a user shared memory segment. The driver for the adapter can not handle physical addresses above 4GB. Unfortunately, I have 16GB in my system. I would like to force the physical memory addresses returned by shmget() to be below the 4GB boundary. This would allow the driver calls to get_user_pages() and ultimately page_to_phys() to return an address that is valid inside of 32-bits. Is there a way to make this happen? I am running RH Linux 2.6.9-67.ELsmp

Angelo Dvorak
angelo.d.dvorak@lmco.com

GFP_DMA32

mcmanus
on
June 14, 2008 - 6:54am

I don't know of any way for userspace to influence shmget() in that way.

But you can have the driver allocate the memory with GFP_DMA32 and then your multiple processes can mmap() that that ram and share it with the device.

The GFP_DMA32 code went into kernel.org in 2.6.15. RHEL 4 backported a whopping 1100+ patches onto 2.6.9, but this was not one of them.

-Patrick

--
Linux Consulting
http://www.ducksong.com/
http://bitsup.blogspot.com/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.