Re: [RFC PATCH 4/4] x86/mm: remove bottom-up allocation style for x86_64

From: Dave Hansen
Date: Tue Jan 08 2019 - 12:33:03 EST


On 1/7/19 10:13 PM, Pingfan Liu wrote:
> On Tue, Jan 8, 2019 at 1:42 AM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>> Why is this 0x100000 open-coded? Why is this needed *now*?
>>
>
> Memory under 1MB should be used by BIOS. For x86_64, after
> e820__memblock_setup(), the memblock allocator has already been ready
> to work. But there are two factors to in order to
> set_alloc_range(0x100000, end). The major one is to be compatible with
> x86_32, please refer to alloc_low_pages->memblock_find_in_range() uses
> [min_pfn_mapped, max_pfn_mapped] to limit the range, which is ready to
> be allocated from. The minor one is to prevent unexpected allocation
> from memblock allocator through allow_low_pages() at very early stage.

Wow, that's a ton of critical information which was neither commented
upon or referenced in the changelog. Can you fix this up in the next
version, please?