summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorAdam Litke2007-10-16 10:26:19 +0200
committerLinus Torvalds2007-10-16 18:43:02 +0200
commite4e574b767ba63101cfda2b42d72f38546319297 (patch)
tree084b94d01c71ccd898f8df0ec441e6726e657e75 /kernel/sysctl.c
parenthugetlb: Try to grow hugetlb pool for MAP_PRIVATE mappings (diff)
downloadkernel-qcow2-linux-e4e574b767ba63101cfda2b42d72f38546319297.tar.gz
kernel-qcow2-linux-e4e574b767ba63101cfda2b42d72f38546319297.tar.xz
kernel-qcow2-linux-e4e574b767ba63101cfda2b42d72f38546319297.zip
hugetlb: Try to grow hugetlb pool for MAP_SHARED mappings
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: Adam Litke <agl@us.ibm.com> Acked-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Dave 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sysctl.c')
0 files changed, 0 insertions, 0 deletions