Re: [PATCH 0/4] mm,memory_hotplug: allocate memmap from hotadded memory

David Hildenbrand
2019-04-02T08:39:28Z

On 02.04.19 10:28, Oscar Salvador wrote:
> On Mon, Apr 01, 2019 at 01:53:06PM +0200, Michal Hocko wrote:
>> On Mon 01-04-19 09:59:36, Oscar Salvador wrote:
>>> On Fri, Mar 29, 2019 at 02:42:43PM +0100, Michal Hocko wrote:
>>>> Having a larger contiguous area is definitely nice to have but you also
>>>> have to consider the other side of the thing. If we have a movable
>>>> memblock with unmovable memory then we are breaking the movable
>>>> property. So there should be some flexibility for caller to tell whether
>>>> to allocate on per device or per memblock. Or we need something to move
>>>> memmaps during the hotremove.
>>>
>>> By movable memblock you mean a memblock whose pages can be migrated over when
>>> this memblock is offlined, right?
>>
>> I am mostly thinking about movable_node kernel parameter which makes
>> newly hotpluged memory go into ZONE_MOVABLE and people do use that to
>> make sure such a memory can be later hotremoved.
>
> Uhm, I might be missing your point, but hot-added memory that makes use of
> vmemmap pages can be hot-removed as any other memory.
>
> Vmemmap pages do not account as unmovable memory, they just stick around
> until all sections they referred to have been removed, and then, we proceed
> with removing them.
> So, to put it in another way: vmemmap pages are left in the system until the
> whole memory device (DIMM, virt mem-device or whatever) is completely
> hot-removed.

Indeed, separate memblocks can be offlined, but vmemmap is removed along
with remove_memory().

--

Thanks,

David / dhildenb