lkml.org 
[lkml]   [2017]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] mmap(MAP_CONTIG)
From
Date
On 10/03/2017 04:56 PM, Mike Kravetz wrote:
> mmap(MAP_CONTIG) would have the following semantics:
> - The entire mapping (length size) would be backed by physically contiguous
> pages.
> - If 'length' physically contiguous pages can not be allocated, then mmap
> will fail.
> - MAP_CONTIG only works with MAP_ANONYMOUS mappings.
> - MAP_CONTIG will lock the associated pages in memory. As such, the same
> privileges and limits that apply to mlock will also apply to MAP_CONTIG.
> - A MAP_CONTIG mapping can not be expanded.

Do you also need to lock out the NUMA migration APIs somehow? What
about KSM (or does it already ignore VM_LOCKED)?

> - At fork time, private MAP_CONTIG mappings will be converted to regular
> (non-MAP_CONTIG) mapping in the child. As such a COW fault in the child
> will not require a contiguous allocation.
Maybe we should just define it as acting as if it had MADV_DONTFORK set
on it, and also that it doesn't allow MADV_DONTFORK to be called on it.

\
 
 \ /
  Last update: 2017-10-24 00:10    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog