Re: [PATCH] x86: Construct 32 bit boot time page tables in nativeformat.

From: H. Peter Anvin
Date: Mon Jan 21 2008 - 16:39:24 EST


Ian Campbell wrote:
On Sun, 2008-01-20 at 20:30 +0200, Mika Penttilà wrote:
You have dropped the requirement to map all of low memory (the boot allocator is used for instance to construct physical mem mapping). Either you should fix your INIT_MAP_BEYOND_END or make a big comment telling us why it isn't necessary anymore to map low mem.

I think you are right. The patch ensures that all the initial page
tables themselves have mappings but won't map the additional pages
needed for mapping the rest of lowmem.

However, I think it is no longer necessary to map a whole new 4G worth
of page table pages because the code in kernel_physical_mapping_init now
extends the initial mappings rather than replacing them (see changes to
native_pagetable_setup_start). So now we only need to map 4G worth of
page tables including the initial page tables. That means we only need
to map a fixed set of extra pages rather than the sliding limit
currently used in the patch.


We still need to be able to construct those page tables, which is what that stuff is about...


I'm not convinced by the additional 16MB for CONFIG_DEBUG_PAGEALLOC --
we map enough pages for page tables for 4G of lowmem -- adding space for
an extra 16M seems pointless.

If so, adjusting the limit should be a separate patch.

Either way, I'm increasingly thinking that setting up the initial page tables via an assembly loop instead of worrying about the C accessors is actually cleaner (I prototyped it yesterday, although I still need the rest of the machinery.)


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