Re: Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?]

Roman Zippel (zippel@linux-m68k.org)
Thu, 09 May 2002 01:11:20 +0200


Hi,

Daniel Phillips wrote:

> Your patch preserves a linear relationship between physical and virtual
> memory, because you do both the ptov and vtop lookup in the same array. As
> such, you don't provide the functionality I provide of being able to fit a
> large amount of physical memory into a small amount of virtual memory, and
> you can't join all your separate pgdat's into one, as I do.

Read the source again. arch/m68k/mm/motorola.c:map_chunk() maps all
memory areas into single virtual area (virtaddr is static there and only
increased starting from PAGE_OFFSET). In paging_init() there is only a
single call to free_area_init().

> and replace the four direct table lookup with loops.

The loops are only an implementation detail and can be replaced with
another algorithm.

> you've accidently
> repeated the last four lines of mm_vtop. Finally, it looks like your
> ZTWO_VADDR hack in mm_ptov would also cease to be a special case, at least,

That stuff is obsolete since ages, it should be replaced with BUG().

> You do have a config option, it's CONFIG_SINGLE_MEMORY_CHUNK.

That was our cheap answer to avoid the loops.

> You just didn't
> attempt to create the contiguous logical address space as I did, so you
> didn't need to go outside your arch.

I don't need that, because I create a contiguous _virtual_ address
space.

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