Re: [PATCH] x86,mm: fix init_mem_mapping() when the first memorychunk is small

From: Yinghai Lu
Date: Fri Mar 08 2013 - 14:01:16 EST


On Fri, Mar 8, 2013 at 10:47 AM, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
> In init_mem_mapping(), if the first chunk of memory that is mapped is
> small, there will not be enough mapped pages to allocate page table
> pages for the next (larger) chunk.
>
> Estimate how many pages are used for the mappings so far and how many
> are needed for a larger chunk, and only increase step_size if there
> are enough free pages.
>
> This fixes a boot failure on a system where the first chunk of memory
> mapped only had 3 pages in it.
>
> init_memory_mapping: [mem 0x00000000-0x000fffff]
> init_memory_mapping: [mem 0x20d000000-0x20d002fff]
> init_memory_mapping: [mem 0x20c000000-0x20cffffff]
> Kernel panic - not syncing: alloc_low_page: can not alloc memory

Can you check current linus tree?

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=98e7a989979b185f49e86ddaed2ad6890299d9f0

should fix the problem with your system.

Thanks

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