From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by kanga.kvack.org (Postfix) with ESMTP id 2B9456B0271 for ; Wed, 3 Oct 2018 09:38:23 -0400 (EDT) Received: by mail-qt1-f199.google.com with SMTP id d18-v6so5049077qtj.20 for ; Wed, 03 Oct 2018 06:38:23 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id p9-v6si924977qvd.85.2018.10.03.06.38.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 06:38:22 -0700 (PDT) From: Vitaly Kuznetsov Subject: Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types In-Reply-To: <98fb8d65-b641-2225-f842-8804c6f79a06@redhat.com> References: <20180928150357.12942-1-david@redhat.com> <20181001084038.GD18290@dhcp22.suse.cz> <20181002134734.GT18290@dhcp22.suse.cz> <98fb8d65-b641-2225-f842-8804c6f79a06@redhat.com> Date: Wed, 03 Oct 2018 15:38:04 +0200 Message-ID: <8736tndubn.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: David Hildenbrand , Michal Hocko Cc: Kate Stewart , Rich Felker , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Balbir Singh , Dave Hansen , Heiko Carstens , linux-mm@kvack.org, Pavel Tatashin , Paul Mackerras , "H. Peter Anvin" , Rashmica Gupta , Boris Ostrovsky , linux-s390@vger.kernel.org, Michael Neuling , Stephen Hemminger , Yoshinori Sato , Michael Ellerman , linux-acpi@vger.kernel.org, Ingo Molnar , xen-devel@lists.xenproject.org, Rob Herring , Len Brown , Fenghua Yu , Stephen Rothwell , "mike.travis@hpe.com" , Haiyang Zhang , Dan Williams , Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , Nicholas Piggin , Joe Perches , =?utf-8?B?SsOpcsO0?= =?utf-8?B?bWU=?= Glisse , Mike Rapoport , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Joonsoo Kim , Oscar Salvador , Juergen Gross , Tony Luck , Mathieu Malaterre , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Mauricio Faria de Oliveira , Philippe Ombredanne , Martin Schwidefsky , devel@linuxdriverproject.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, "Kirill A. Shutemov" David Hildenbrand 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). -- Vitaly