[Linaro-mm-sig] how to avoid allocating or freeze MOVABLE memory in userspace
Christoph Lameter
cl at linux.com
Fri Apr 13 18:27:30 UTC 2012
On Fri, 13 Apr 2012, Haojian Zhuang wrote:
> I have one question on memory migration. As we know, malloc() from
> user app will allocate MIGRATE_MOVABLE pages. But if we want to use
> this memory as DMA usage, we can't accept MIGRATE_MOVABLE type. Could
> we change its behavior before DMA working?
MIGRATE_MOVABLE works fine for DMA. If you keep a reference from a device
driver to user pages then you will have to increase the page refcount
which will in turn pin the page and make it non movable for as long as you
keep the refcount.
More information about the Linaro-mm-sig
mailing list