Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

From
Vitaly Kuznetsov <vkuznets@redhat.com>
Date
2018-10-03 14:34:23
Also in
linux-acpi, linux-mm
Reply to
Dave Hansen, 2018-10-03
Dave Hansen [off-list ref] writes:
On 10/03/2018 06:52 AM, Vitaly Kuznetsov wrote:
quoted
It is more than just memmaps (e.g. forking udev process doing memory
onlining also needs memory) but yes, the main idea is to make the
onlining synchronous with hotplug.
That's a good theoretical concern.

But, is it a problem we need to solve in practice?
Yes, unfortunately. It was previously discovered that when we try to
hotplug tons of memory to a low memory system (this is a common scenario
with VMs) we end up with OOM because for all new memory blocks we need
to allocate page tables, struct pages, ... and we need memory to do
that. The userspace program doing memory onlining also needs memory to
run and in case it prefers to fork to handle hundreds of notfifications
... well, it may get OOMkilled before it manages to online anything.

Allocating all kernel objects from the newly hotplugged blocks would
definitely help to manage the situation but as I said this won't solve
the 'forking udev' problem completely (it will likely remain in
'extreme' cases only. We can probably work around it by onlining with a
dedicated process which doesn't do memory allocation).

-- 
Vitaly
Thread (36 messages) 36 messages, 5 authors, last reply 2018-11-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help