Mel Gorman wrote:
Not all arches will use init_bootmem(). Arm for example useswell, I don't agree here. ARCH_PFN_OFFSET is used to save the first
init_bootmem_node(). ARCH_PFN_OFFSET is only meant to affect mem_map,
page number that has physical memory. I don't see why we couldn't useit to correctly initialise the memory system...
Architectures will not always have a known fixed start of physical
memory. On IA64 at least, they initialise memory as if it starts at 0
but on my one test machine, the beginning part is always a memory hole.
in that case ARCH_PFN_OFFSET is 0 which is the old behaviour, nothing
change...
I've seen nothing to indicate that this hole will be the same size on
all IA64 machines but I kinda doubt it. Also, arches that use
init_bootmem() do not necessary use free_area_init().
but in that case do they use ARCH_PFN_OFFSET != 0 ?
if so that would be
very surprising. That would meand "I have a hole a the start of my mem,
I don't know at compile time where it starts, but I state that my physical
mem start at ARCH_PFN_OFFSET anyways"
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...
While you may be right, it'll only fix the problem for arches with
ARCH_PFN_OFFSET and using init_bootmem (which is the case of MIPS I
guess). But arches using init_bootmem_node or not using free_area_init()
may still get kicked.
Again in these cases, I doubt that they will setup ARCH_PFN_OFFSET...