lkml.org 
[lkml]   [2008]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectcopy_page_range() with VM_LOCKED
Hi all,

In order to optimize fork performance copy_page_range avoids copying
page tables under certain circumstances:

if (!(vma->vm_flags &
(VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP|VM_INSERTPAGE))) {
if (!vma->anon_vma)
return 0;
}

I have a VM_LOCKED vma that I would really, really like not to fault
on, but because copy_page_range does not copy the page tables of the
vma I do end up faulting in my VM_LOCKED vma. Now as far as I'm aware
mmap with MAP_LOCKED only promises the page will not be paged out, not
that the page will never fault but I would like to get that behaviour.

Would it be possible to add VM_LOCKED to the above conditional so
copy_page_range would always copy VM_LOCKED vma page tables or would
that be considered insane and broken?

Thanks,


\
 
 \ /
  Last update: 2008-03-10 17:29    [W:0.036 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site