Re: locking user space memory in kernel
From: Manfred Spraul
Date: Sun Mar 21 2004 - 06:36:11 EST
Hi Eli,
I think just get_user_pages() should be sufficient: the pages won't be
swapped out. You don't need to set VM_LOCKED in vma->vm_flags to prevent
the swap out. In the worst case, the pte is cleared a that will cause a
soft page fault, but the physical address won't change. Multiple
get_user_pages() calls on overlapping regions are ok, the page count is
an atomic_t, at least 24-bit large.
--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/