Skip to content
  • Adam Litke's avatar
    [PATCH] hugetlb: overcommit accounting check · 2e9b367c
    Adam Litke authored
    
    
    Basic overcommit checking for hugetlb_file_map() based on an implementation
    used with demand faulting in SLES9.
    
    Since demand faulting can't guarantee the availability of pages at mmap
    time, this patch implements a basic sanity check to ensure that the number
    of huge pages required to satisfy the mmap are currently available.
    Despite the obvious race, I think it is a good start on doing proper
    accounting.  I'd like to work towards an accounting system that mimics the
    semantics of normal pages (especially for the MAP_PRIVATE/COW case).  That
    work is underway and builds on what this patch starts.
    
    Huge page shared memory segments are simpler and still maintain their
    commit on shmget semantics.
    
    Signed-off-by: default avatarAdam Litke <agl@us.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    2e9b367c