Re: [PATCH] hugetlb: powerpc: Actively close unused htlb regionson vma close

From: Adam Litke
Date: Fri Jun 02 2006 - 12:49:01 EST


On Fri, 2006-06-02 at 17:43 +0100, Hugh Dickins wrote:
> On Fri, 2 Jun 2006, Adam Litke wrote:
> >
> > On powerpc, each segment can contain pages of only one size. When a
> > hugetlb mapping is requested, a segment is located and marked for use
> > with huge pages. This is a uni-directional operation -- hugetlb
> > segments are never marked for use again with normal pages. For long
> > running processes which make use of a combination of normal and hugetlb
> > mappings, this behavior can unduly constrain the virtual address space.
> >
> > The following patch introduces a architecture-specific vm_ops.close()
> > hook. For all architectures besides powerpc, this is a no-op. On
> > powerpc, the low and high segments are scanned to locate empty hugetlb
> > segments which can be made available for normal mappings. Comments?
>
> Wouldn't hugetlb_free_pgd_range be a better place to do that kind of
> thing, all within arch/powerpc, no need for arch_hugetlb_close_vma etc?

Hmm. Interesting idea. I'll take a look.

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/