Re: [crash] Re: Latest brk patchset

From: Jeremy Fitzhardinge
Date: Mon Mar 16 2009 - 15:26:10 EST


H. Peter Anvin wrote:
Jeremy Fitzhardinge wrote:
Yinghai Lu wrote:
could be max_pfn_mapped change in head_32.S that reduce mapping range to _end only.

Yes, I would say you're right. Trimming the mapping to _end only leaves the space under the kernel avaliable for allocating pagetable from e820 space. In this case we've got DEBUG_PAGEALLOC enabled, which inhibits the use of PSE, and BIOS corruption checking on, which eats a chunk of low memory. In combination, there's only 0x8f000 bytes free below the kernel, and it needs 0xe1000 to allocate for pagetables.

Reverting 2bd2753ff46346543ab92e80df9d96366e21baa5 fixes the problem for me, though it does result in a kernel with a 73MB BSS...


Waitaminute... there is no way we could end up with 73 MB page tables unless something is seriously screwy. Even with PAE and !PSE, we only get 2 MB worth of page tables for each 1 GB mapped -- even with a 4:4 scheme this is only 8 MB.

Yes, something odd happened there.

Anyway, this patch fixes it. I also removed ALLOCATOR_SLOP, because it is left over from when we used the bootmem allocator for the linear mapping pagetable, before using e820 allocation.

Did you also want to pull the changes to put the brk in .brk and rename the reservation symbols?

J

The following changes since commit 2bd2753ff46346543ab92e80df9d96366e21baa5:
Yinghai Lu (1):
x86: put initial_pg_tables into .bss

are available in the git repository at:

ssh://master.kernel.org/~jeremy/git/xen.git tip/x86/setup-memory

Jeremy Fitzhardinge (2):
x86-32: make sure we map enough to fit linear map pagetables
x86-32: remove ALLOCATOR_SLOP from head_32.S

arch/x86/kernel/head_32.S | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)