On Fri, Nov 19, 2010 at 04:33:51PM -0700, Eric B Munson wrote: > Since 2.6.32 the kernel has supported pseudo-anonymous mmaps for > huge pages without having hugetlbfs mounted. This patch adds a > check for that kernel feature. > > Signed-off-by: Eric B Munson <emun...@mgebm.net> > --- > kernel-features.c | 4 ++++ > libhugetlbfs_privutils.h | 3 +++ > 2 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/kernel-features.c b/kernel-features.c > index 09d0486..b8cdec9 100644 > --- a/kernel-features.c > +++ b/kernel-features.c > @@ -44,6 +44,10 @@ static struct feature kernel_features[] = { > [HUGETLB_FEATURE_SAFE_NORESERVE] = { > .name = "noreserve_safe", > .required_version = "2.6.34", > + }, > + [HUGETLB_FEATURE_MAP_HUGETLB] = { > + .name = "map_hugetlb", > + .required_version = "2.6.32", > } > }; > > diff --git a/libhugetlbfs_privutils.h b/libhugetlbfs_privutils.h > index aaa638f..a693c24 100644 > --- a/libhugetlbfs_privutils.h > +++ b/libhugetlbfs_privutils.h > @@ -80,6 +80,9 @@ enum { > /* Whether use of MAP_NORESERVE is safe or can result in OOM */ > HUGETLB_FEATURE_SAFE_NORESERVE, > > + /* If the kernel has the ability to mmap huge pages without a mount */ > + HUGETLB_FEATURE_MAP_HUGETLB, > +
make it mma If the kernel has the ability to mmap(MAP_HUGETLB) It was possible to map shared memory without a mount before and while I know that's not mmap(), the current comment is fuzzy. Otherwise Acked-by: Mel Gorman <m...@csn.ul.ie> > HUGETLB_FEATURE_NR, > }; > #define hugetlbfs_test_feature __pu_hugetlbfs_test_feature -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel