[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: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
- From: Michal Hocko <mhocko@xxxxxxxxxx>
- Date: Wed, 3 Oct 2018 15:44:44 +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>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, 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 13:45:00 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed 03-10-18 15:38:04, Vitaly Kuznetsov wrote:
> David Hildenbrand <david@xxxxxxxxxx> writes:
>
> > On 02/10/2018 15:47, Michal Hocko wrote:
> ...
> >>
> >> Why do you need a generic hotplug rule in the first place? Why don't you
> >> simply provide different set of rules for different usecases? Let users
> >> decide which usecase they prefer rather than try to be clever which
> >> almost always hits weird corner cases.
> >>
> >
> > Memory hotplug has to work as reliable as we can out of the box. Letting
> > the user make simple decisions like "oh, I am on hyper-V, I want to
> > online memory to the normal zone" does not feel right. But yes, we
> > should definitely allow to make modifications.
>
> Last time I was thinking about the imperfectness of the auto-online
> solution we have and any other solution we're able to suggest an idea
> came to my mind - what if we add an eBPF attach point to the
> auto-onlining mechanism effecively offloading decision-making to
> userspace. We'll of couse need to provide all required data (e.g. how
> memory blocks are aligned with physical DIMMs as it makes no sense to
> online part of DIMM as normal and the rest as movable as it's going to
> be impossible to unplug such DIMM anyways).
And how does that differ from the notification mechanism we have? Just
by not relying on the process scheduling? If yes then this revolves
around the implementation detail that you care about time-to-hot-add
vs. time-to-online. And that is a solveable problem - just allocate
memmaps from the hot-added memory.
As David said some of the memory cannot be onlined without further steps
(e.g. when it is standby as David called it) and then I fail to see how
eBPF help in any way.
--
Michal Hocko
SUSE Labs
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|