lkml.org 
[lkml]   [2003]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: objrmap and vmtruncate
    could we focus and solve the remap_file_pages current breakage first?

    I proposed my fix that IMHO is optimal and simple (I recall Hugh also
    proposed something on these lines):

    1) allow it only inside mmap(VM_NONLINAER) vmas only
    2) have the VM skip over VM_NONLINEAR vmas enterely
    3) set vma->vm_file to NULL for those vams and forbid paging and allow
    multiple files to be mapped in the same nonlinaer vma (add an fd
    parameter to the syscall)
    4) enable it as non-root (w/o IPC_LOCK capability) only with a sysctl
    enabled
    5) avoid any overhead connected with the potential paging of the
    nonlinaer vmas
    6) populate it with pmd on hugetlbfs
    7) if a truncate happens leave the page pinned outside the pagecache
    but still mapped into userspace, we don't care about it and it will
    be freed during the munmap of the nonlinear vma

    Note: in the longer run if you want, you can as well change the kernel
    internals to make this area pageable and then you won't need a sysctl
    anymore.

    The mmap and remap_file_pages kind of overlaps, remap_file_pages is the
    "hack" that should be quick and simple IMHO. Everything not just
    intersting as a pte mangling vm-bypass should happen in the mmap layer
    IMHO.

    Andrea
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:34    [W:0.019 / U:0.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site