[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH RFC] mm/memory_hotplug: Introduce memory block types
- To: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxxxx>
- From: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
- Date: Wed, 03 Oct 2018 16:34:03 +0200
- Cc: Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Balbir Singh <bsingharora@xxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, linux-mm@xxxxxxxxx, Paul Mackerras <paulus@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Rashmica Gupta <rashmica.g@xxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, Michael Neuling <mikey@xxxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, linux-acpi@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Len Brown <lenb@xxxxxxxxxx>, Pavel Tatashin <pavel.tatashin@xxxxxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, "mike.travis@xxxxxxx" <mike.travis@xxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Jonathan Neuschäfer <j.neuschaefer@xxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Jérôme Glisse <jglisse@xxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Mathieu Malaterre <malat@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Mauricio Faria de Oliveira <mauricfo@xxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Philippe Ombredanne <pombredanne@xxxxxxxx>, Joe Perches <joe@xxxxxxxxxxx>, devel@xxxxxxxxxxxxxxxxxxxxxx, Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
- Delivery-date: Wed, 03 Oct 2018 14:34:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> writes:
> On 10/03/2018 06:52 AM, Vitaly Kuznetsov wrote:
>> 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|