Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • I ipipe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomaixenomai
  • ipipe
  • Repository
  • ipipe
  • mm
  • hugetlb.c
Find file Blame History Permalink
  • Adam Litke's avatar
    hugetlb: Try to grow hugetlb pool for MAP_SHARED mappings · e4e574b7
    Adam Litke authored Oct 16, 2007
    
    
    Shared mappings require special handling because the huge pages needed to
    fully populate the VMA must be reserved at mmap time.  If not enough pages are
    available when making the reservation, allocate all of the shortfall at once
    from the buddy allocator and add the pages directly to the hugetlb pool.  If
    they cannot be allocated, then fail the mapping.  The page surplus is
    accounted for in the same way as for private mappings; faulted surplus pages
    will be freed at unmap time.  Reserved, surplus pages that have not been used
    must be freed separately when their reservation has been released.
    
    Signed-off-by: default avatarAdam Litke <agl@us.ibm.com>
    Acked-by: default avatarAndy Whitcroft <apw@shadowen.org>
    Acked-by: default avatarDave McCracken <dave.mccracken@oracle.com>
    Cc: William Irwin <bill.irwin@oracle.com>
    Cc: David Gibson <david@gibson.dropbear.id.au>
    Cc: Ken Chen <kenchen@google.com>
    Cc: Badari Pulavarty <pbadari@us.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e4e574b7

Imprint & Privacy Policy