[lkml]   [2003]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    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
    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

    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

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

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