On Tue, Aug 05, 2008 at 04:20:02PM +0000, Adam Litke wrote:
> On Tue, 2008-08-05 at 10:19 +0100, Mel Gorman wrote:
> > On (04/08/08 20:01), Adam Litke didst pronounce:
> > > Historically, libhugetlbs has relied on kernel features that either: have 
> > > been
> > > known to exist in all supported kernel versions, or are easily detected.  
> > > As of
> > > kernel version 2.6.27-rc1, a new crucial feature has been added that is 
> > > not
> > > possible to reliably detect.  Huge page mappings created with the 
> > > MAP_PRIVATE
> > > flag will have huge pages reserved up-front.  With private reservations in
> > > effect, it is safe to allow demand-faulting of the HUGETLB_MORECORE heap 
> > > which
> > > can lead to dramatic performance improvements on NUMA systems.  This is 
> > > only
> > > safe behavior in the presence of private reservations.
> > > 
> > 
> > Just in case, could you ask a glibc person if the kernel exports
> > something like a features bitmask to userspace? I suspect it's via the
> > kernel headers if it happens at all though and we need to do something
> > like this patch instead.
> 
> It looks like glibc uses a compile-time feature-checking scheme -- see
> sysdeps/unix/sysv/linux/kernel-features.h.  Looks like you compile glibc
> with a minimum kernel version and #define's are used to mark features as
> available.

There is also some feature stuff passed in by the kernel as part of
the ELF auxiliary vector.  Unfortunately I'm pretty sure the hugepage
stuff won't be there.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to