Re: [RFC PATCH 0/4] x86_64/mm: remove bottom-up allocation style by pushing forward the parsing of mem hotplug info

From: Dave Hansen
Date: Mon Jan 07 2019 - 12:04:07 EST

On 1/7/19 12:24 AM, Pingfan Liu wrote:
> Background about the defect of the current bottom-up allocation style, take
> the following scenario:
> | unmovable node | movable node |
> | kaslr-kernel |subtree of pgtable for phy<->virt |
> Although kaslr-kernel can avoid to stain the movable node. But the
> pgtable can still stain the movable node. That is a probability problem,
> with low probability, but still exist. This patch tries to eliminate the
> probability. With the previous patch, at the point of init_mem_mapping(),
> memblock allocator can work with the knowledge of acpi memory hotmovable
> info, and avoid to stain the movable node. As a result,
> memory_map_bottom_up() is not needed any more.

I'm really missing the basic problem statement. What's the problem this
is fixing? What is the end-user-visible impact of this problem?

To make memory hot-remove work, we want as much memory as possible to he
hot-removable, which is basically what movable nodes are used for. But,
it sounds like, maybe, that KASLR can place the kernel image inside the
movable node. This is somehow related to the bottom-up allocation style
currently in use.