[RFD] Hugetlb: Allowing hugetlb regions to be closed

Adam Litke agl at us.ibm.com
Fri May 19 01:23:58 EST 2006


Please correct me if I am wrong in any of the following...

On powerpc, once a region of the address space has been 'opened' for use
with hugetlb pages this region can never again contain normal pages for
the remaining life of the process -- even if all hugetlb mappings have
been unmapped from this region.

The above approach is nice and simple, but a bit restrictive too.  Would
people be opposed to a patch which provides methods for closing low/high
hugetlb areas and logic in arch_get_unmapped_area() to perform the
closing?  My thought would be to try closing only in the full_search:
case (so the fast path is left untouched.

As for why I want this... I have an application (libhugetlbfs), which
provides hugetlb pages to applications in an abstracted manner.  There
are situations where the library creates a hugetlb area and needs to
later replace it with normal pages.  The main case this will happen is
for a hugetlb-backed malloc area.  

Thoughts?
-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center




More information about the Linuxppc-dev mailing list