Re: [PATCH] mm: setup pageblock_order before it's used by sparse

2012-07-18 Thread Benjamin Herrenschmidt
On Tue, 2012-07-03 at 11:29 +0800, Jiang Liu wrote: > OK, waiting response from PPC. If we could find some ways to set > HPAGE_SIZE > early on PPC too, we can setup pageblock_order in arch instead of > page_alloc.c > as early as possible. We could split our hugetlbpage_init() into two, with the b

Re: [PATCH] mm: setup pageblock_order before it's used by sparse

2012-07-18 Thread Benjamin Herrenschmidt
On Mon, 2012-07-02 at 20:25 -0700, Yinghai Lu wrote: > > That means pageblock_order is always set to "MAX_ORDER - 1", not sure > > whether this is intended. And it has the same issue as IA64 of wasting > > memory if CONFIG_SPARSE is enabled. > > adding BenH, need to know if it is powerpc intended.

Re: [PATCH] mm: setup pageblock_order before it's used by sparse

2012-07-02 Thread Jiang Liu
>> Hi Yinghai, >> >> I'm afraid the v2 will break powerpc. Currently only IA64 and PowerPC >> supports variable hugetlb size. >> >> HPAGE_SHIFT is a variable default to 0 on powerpc. But seems PowerPC >> is doing something wrong here, according to it's mm initialization >> sequence as below: >> sta

Re: [PATCH] mm: setup pageblock_order before it's used by sparse

2012-07-02 Thread Jiang Liu
On 2012-7-3 4:43, Yinghai Lu wrote: > On Sun, Jul 1, 2012 at 7:01 PM, Jiang Liu wrote: >> Hi Yinghai, >> The patch fails compilation as below: >> mm/page_alloc.c:151: error: initializer element is not constant >> mm/page_alloc.c:151: error: expected ‘,’ or ‘;’ before ‘__attribute__’ >> >>

Re: [PATCH] mm: setup pageblock_order before it's used by sparse

2012-07-02 Thread Yinghai Lu
On Mon, Jul 2, 2012 at 7:54 PM, Jiang Liu wrote: > On 2012-7-3 4:43, Yinghai Lu wrote: >> On Sun, Jul 1, 2012 at 7:01 PM, Jiang Liu wrote: >>> Hi Yinghai, >>> The patch fails compilation as below: >>> mm/page_alloc.c:151: error: initializer element is not constant >>> mm/page_alloc.c:151: