Skip to content

MAP_NORESERVE for hugetlb mappings V1

Andy Whitcroft linux-mm lkml 1 version New

Get series with b4
b4 am exportbomb.1210191800@pinky

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3record MAP_NORESERVE status on vmas and fix small page mprotect reservationsinclude/linux/mm.h mm/mmap.c mm/mprotect.c+6 -40 replies
2/3hugetlb-move-reservation-region-support-earliermm/hugetlb.c+121 -1210 replies
3/3hugetlb-allow-huge-page-mappings-to-be-created-without-reservationsmm/hugetlb.c+55 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] MAP_NORESERVE for hugetlb mappings V1

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.

The stack is made up of three patches:

record-MAP_NORESERVE-status-on-vmas-and-fix-small-page-mprotect-reservations --
currently when we mprotect a private MAP_NORESERVE mapping read-write we have no choice but to create a reservation for it. Fix that by introducing a VM_NORESERVE vma flag and checking it before allocating reserve.

hugetlb-move-reservation-region-support-earlier -- simply moves the
reservation region support so it can be used earlier.

hugetlb-allow-huge-page-mappings-to-be-created-without-reservations --
use the new VM_NORESERVE flag to control the application of hugetlb reservations to new mappings.

All against 2.6.25-mm1 with Mel's private reservation patches:

Subject: Guarantee faults for processes that call mmap(MAP_PRIVATE)
on hugetlbfs v2

Thanks to Mel Gorman for reviewing a number of early versions of these patches.

-apw

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>