Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - shm_ctl() fails with SHMCTL_PHYS|SHMCTL_GLOBAL on ARM target: (5 Items)
   
shm_ctl() fails with SHMCTL_PHYS|SHMCTL_GLOBAL on ARM target  
We're trying to optimize performance of our pxa270 product.

Towards that end we want to map in a region of the processors internal on-chip SRAM as shared memory.

When using SHMCTL_PHYS|SHMCTL_GLOBAL flags, shm_ctl() returns errno 89 (Function not implemented).

If we leave off the SHMCTL_GLOBAL then the code works but we need to map it GLOBAL to prevent the cache flush on context
 switch slowdown that occurs with this cache design.

The docs indicate this should be possible.

Anyone know anything about this?
Re: shm_ctl() fails with SHMCTL_PHYS|SHMCTL_GLOBAL on ARM target  
Ken Schumm wrote:
> We're trying to optimize performance of our pxa270 product.
> 
> Towards that end we want to map in a region of the processors internal on-chip SRAM as shared memory.
> 
> When using SHMCTL_PHYS|SHMCTL_GLOBAL flags, shm_ctl() returns errno 89 (Function not implemented).
> 
> If we leave off the SHMCTL_GLOBAL then the code works but we need to map it GLOBAL to prevent the cache flush on 
context switch slowdown that occurs with this cache design.
> 
> The docs indicate this should be possible.
> 
> Anyone know anything about this?


I think you will get a better/faster response to your question if you post it to OSTech forum. 
Re: shm_ctl() fails with SHMCTL_PHYS|SHMCTL_GLOBAL on ARM target  
[...]

> > Anyone know anything about this?
> 
> 
> I think you will get a better/faster response to your question if you post it 
> to OSTech forum. 

You're probably right, thanks, I posted the question over there.



Re: shm_ctl() fails with SHMCTL_PHYS|SHMCTL_GLOBAL on ARM target  
If you're just trying to access physical memory, how about trying mmap instead?
Re: shm_ctl() fails with SHMCTL_PHYS|SHMCTL_GLOBAL on ARM target  
> If you're just trying to access physical memory, how about trying mmap instead
> ?


Accessing the memory isn't a problem, accessing it efficiently is. Without the SHMCTL_GLOBAL flag the cache flushes on 
every context switch.