]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] tightening hugetlb strict accounting
authorChen, Kenneth W <kenneth.w.chen@intel.com>
Fri, 23 Jun 2006 09:03:15 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:48 +0000 (07:42 -0700)
commitd3739dfe3262dfabd46bcb9e9831958a0ad8d163
treea3f0042371810ce6d076751d8e403baaa3d2630e
parent1cbbc7c5a5f604fa841396a042d9167c5c829f12
[PATCH] tightening hugetlb strict accounting

Current hugetlb strict accounting for shared mapping always assume mapping
starts at zero file offset and reserves pages between zero and size of the
file.  This assumption often reserves (or lock down) a lot more pages then
necessary if application maps at none zero file offset.  libhugetlbfs is
one example that requires proper reservation on shared mapping starts at
none zero offset.

This patch extends the reservation and hugetlb strict accounting to support
any arbitrary pair of (offset, len), resulting a much more robust and
accurate scheme.  More importantly, it won't lock down any hugetlb pages
outside file mapping.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/hugetlbfs/inode.c
include/linux/hugetlb.h
mm/hugetlb.c