DMA to User-Space
Jonathan Haws
Jonathan.Haws at sdl.usu.edu
Sat Nov 7 03:34:30 EST 2009
> > One more question about this approach: does the mmap() call
> prevent
> > the kernel from using this memory for other purposes? Will the
> > kernel be able to "move" this memory elsewhere? I guess what I am
> > asking is if this memory is locked for all other purposes?
>
> You've allocated the memory in the kernel and mapped it to
> userspace.
> If the kernel uses that memory for anything else it will be visible
> to
> userspace.
So, does that mean that the kernel could use that memory for something else? I was under the impression that locking the memory prevented the kernel from swapping it out, moving it, *and* using it for other purposes.
This memory that I am mapping is reserved for DMA buffers. If anything else uses it, then that will corrupt my buffer and make it worthless. So basically I want user space to tell the kernel that that portion of memory is out of bounds. Is that possible?
Thanks,
Jonathan
More information about the Linuxppc-dev
mailing list