On Tue, Nov 23, 2010 at 07:40:05AM -0700, Eric B Munson wrote: > On Tue, 23 Nov 2010, Mel Gorman wrote: > > <snip> > > > > } > > > > I'm missing something. How does opening /dev/zero guarantee that we are > > checking for huge page availability? This looks like we are just > > prefaulting some base pages. Should we consider MAP_HUGETLB and > > prefaulting incompatible? That said, the availability of MAP_HUGETLB in > > the kernel guarantees that proper reservations are also available due > > to the timing the features were introduced. > > > > The code that prefaults hugepages without MAP_HUGETLB uses the hugepage fd > as a source for readv. However, with MAP_HUGETLB we won't have that fd to > use so I used /dev/zero instead. This way covers the case where we might > want to be able to prefault pages mapped with MAP_HUGETLB, if this is > unnecessary I can make it simply return if MAP_HUGETLB was used.
Ah, my bad. You are just using /dev/zero as a data source. The page size of the source doesn't matter a jot. Sorry for the noise. -- 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