Re: 2.6.17-mm1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 26 Jun 2006, Franck Bui-Huu wrote:

Mel Gorman wrote:

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 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...


The change is that ARCH_PFN_OFFSET has a slightly different meaning when you alter those two initialisation functions. Currently it is used to offset memmap from NODE_DATA(0)->node_start_pfn. By changing free_area_init() and init_bootmem(), it changes to altering the value of NODE_DATA(0)->node_start_pfn but only when memory is initialised in a particular way. I believe it makes ARCH_PFN_OFFSET even more obscure than it currently is.

I think we should just fix the problem at hand now for which two simple patches have been posted and consider making further changes to free_area_init() and init_bootmem() as a separate issue.

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 ?

IA64 do not and I didn't check all arches.

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...


--
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux