On Mon, Feb 08, 2010 at 03:24:22PM +1100, David Gibson wrote:
> On Thu, Feb 04, 2010 at 09:02:18PM +0000, Eric B. Munson wrote:
> > elflink.c tests slice boundaries for all architectures, but this is
> > not necessary on x86[_64] as there are no rules for placement of
> > huge pages with respect to small pages.  This patch addes a define
> > that will skip this check on x86[_64] builds.
> 
> Hrm.  The x86 versions of hugetlb_slice_end() and so forth are already
> supposed to make this check a nop.  We shouldn't need to ifdef this
> out.
> 

I think the problem may be with the definition of ALIGN_UP

ALIGN_UP(x,a)   (((x) + (a)) & ~((a) - 1))

If the address is already aligned, does this definition not mean that
ALIGN_UP will return a value one hugepage higher than it should? Prehaps
the real definition should have been

ALIGN_UP(x,a)   (((x) + (a) - 1) & ~((a) - 1))

Eric, could you check what the old and rounded values are and see are
the alignment macros screwing things up? If so and the problem is with
ALIGN_UP, try this version.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to