• A
    hugetlb: allow huge page mappings to be created without reservations · c37f9fb1
    Andy Whitcroft 提交于
    By default all shared mappings and most private mappings now have
    reservations associated with them.  This improves semantics by providing
    allocation guarentees to the mapper.  However a small number of
    applications may attempt to make very large sparse mappings, with these
    strict reservations the system will never be able to honour the mapping.
    
    This patch set brings MAP_NORESERVE support to hugetlb files.  This allows
    new mappings to be made to hugetlbfs files without an associated
    reservation, for both shared and private mappings.  This allows
    applications which want to create very sparse mappings to opt-out of the
    reservation system.  Obviously as there is no reservation they are liable
    to fault at runtime if the huge page pool becomes exhausted; buyer beware.
    Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
    Cc: Mel Gorman <mel@csn.ul.ie>
    Cc: Adam Litke <agl@us.ibm.com>
    Cc: Johannes Weiner <hannes@saeurebad.de>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Cc: William Lee Irwin III <wli@holomorphy.com>
    Cc: Hugh Dickins <hugh@veritas.com>
    Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    c37f9fb1
hugetlb.c 43.5 KB