Do not depend on MAX_ORDER when grouping pages by mobility

Stephen Rothwell sfr at
Tue Nov 13 11:44:01 EST 2007

On Mon, 12 Nov 2007 15:54:53 +0000 mel at (Mel Gorman) wrote:
> Ordinarily, the size of a pageblock is determined from the hugepage size.
> On PPC64, the hugepage size is determined at runtime based on the ability
> of the machine. If the machine does not support hugepages, HPAGE_SHIFT is
> 0. This results in pageblock_order being set to -PAGE_SHIFT and a crash
> results shortly afterwards.
> This patch checks that HPAGE_SHIFT is a sensible value before using the
> hugepage size. If it is 0, MAX_ORDER-1 is used instead as this is a sensible
> value of pageblock_order.
> Signed-off-by: Mel Gorman <mel at>

Looks good. Legacy iSeries boots fine with this and David Gibson has run
his libhugetlbfs test suite on a Power5+ machine also running the same
kernel (ppc64_defconfig).

I would be good if we could get this in for 2.6.24 (since, as far as
legacy iSeries is concerned, this is a regression from 2.6.23).  I am not
sure what other testing needs to be done.

Stephen Rothwell                    sfr at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the Linuxppc-dev mailing list