• Andy Whitcroft's avatar
    mm: record MAP_NORESERVE status on vmas and fix small page mprotect reservations · cdfd4325
    Andy Whitcroft authored
    With Mel's hugetlb private reservation support patches applied, strict
    overcommit semantics are applied to both shared and private huge page
    mappings.  This can be a problem if an application relied on unlimited
    overcommit semantics for private mappings.  An example of this would be an
    application which maps a huge area with the intention of using it very
    sparsely.  These application would benefit from being able to opt-out of
    the strict overcommit.  It should be noted that prior to hugetlb
    supporting demand faulting all mappings were fully populated and so
    applications of this type should be rare.
    
    This patch stack implements the MAP_NORESERVE mmap() flag for huge page
    mappings.  This flag has the same meaning as for small page mappings,
    suppressing reservations for that mapping.
    
    Thanks to Mel Gorman for reviewing a number of early versions of these
    patches.
    
    This patch:
    
    When a small page mapping is created with mmap() res...
    cdfd4325
mprotect.c 7.34 KB