Re: 2.6.17-mm1

From: Franck Bui-Huu
Date: Mon Jun 26 2006 - 04:25:29 EST


Hi Mel

Mel Gorman wrote:
> On Fri, 23 Jun 2006, Franck Bui-Huu wrote:
>

[snip]

>>
>> -unsigned long __init init_bootmem (unsigned long start, unsigned long
>> pages)
>> +unsigned long __init init_bootmem(unsigned long start, unsigned long
>> pages)
>> {
>> max_low_pfn = pages;
>> min_low_pfn = start;
>> - return(init_bootmem_core(NODE_DATA(0), start, 0, pages));
>> + return init_bootmem_core(NODE_DATA(0), start, ARCH_PFN_OFFSET,
>> pages);
>> }
>>
>
> Not all arches will use init_bootmem(). Arm for example uses
> init_bootmem_node(). ARCH_PFN_OFFSET is only meant to affect mem_map,

well, I don't agree here. ARCH_PFN_OFFSET is used to save the first
page number that has physical memory. I don't see why we couldn't use
it to correctly initialise the memory system...

If we don't change init_bootmem() to use ARCH_PFN_OFFSET, then the
kernel will initialise the start of memory to 0 which is boggus. IOW,
we can't use this function without this change (except if your memory
start at 0 of course). And I think that init_bootmem() has been
implemented for systems which have only one node _whatever_ memory
start value...

>> #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c

[snip]

>> @@ -2174,8 +2181,7 @@ #endif
>>
>> void __init free_area_init(unsigned long *zones_size)
>> {
>> - free_area_init_node(0, NODE_DATA(0), zones_size,
>> - __pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL);
>> + free_area_init_node(0, NODE_DATA(0), zones_size, ARCH_PFN_OFFSET,
>> NULL);
>> }
>>
>
> Same comment applies as for init_bootmem(). I can't be sure it's a good
> idea.
>

same comment as for init_bootmem()


Franck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/