On 30.06.2008 [16:53:31 +0100], Mel Gorman wrote: > HUGETLB_MORECORE currently exists to allow glibc to back malloc() with > large pages instead of small pages. However, not all applications use glibc > malloc() nor is it always desirable to back malloc() with huge pages. There > exists a requirement that a hugepage-aware application be able to allocate > hugepages directly. > > Currently, each application is expected to discover the filesystem themselves, > mmap() the file and other house-keeping tasks. libhugetlbfs already implements > much of this complex logic internally. This patch exposes a simple API for the > allocation and freeing of regions backed by hugepages. The implementation is > a little over-simplistic but can be optimised later if and when applications > perceive its performance to be a bottleneck. The API itself should not need > to change as a multi-page aware API would be an additional rather than a > replacement interface. > > Changelog since V2 > o Correct typo of GHP > > Changelog since V1 > o Rename hugepages_malloc() to get_huge_pages() > o Use %zd for size_t arguement > o Close leaking FD on mmap() failure > o Drop GHP_FORCELARGE and introduce GHP_DEFAULT > > Signed-off-by: Mel Gorman <[EMAIL PROTECTED]> > Acked-by: David Gibson <[EMAIL PROTECTED]>
I'll apply this when I return home this evening. Thanks, Nish ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel