From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Greg KH <gregkh@linuxfoundation.org>,
"K. Y. Srinivasan" <kys@microsoft.com>,
David Rientjes <rientjes@google.com>,
Daniel Kiper <daniel.kiper@oracle.com>,
linux-api@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-s390@vger.kernel.org, xen-devel@lists.xenproject.org,
linux-acpi@vger.kernel.org
Subject: Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks
Date: Mon, 27 Feb 2017 14:17:56 +0100 [thread overview]
Message-ID: <87wpcbvkl7.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20170227125636.GB26504@dhcp22.suse.cz> (Michal Hocko's message of "Mon, 27 Feb 2017 13:56:37 +0100")
Michal Hocko <mhocko@kernel.org> writes:
> On Mon 27-02-17 11:49:43, Vitaly Kuznetsov wrote:
>> Michal Hocko <mhocko@kernel.org> writes:
>>
>> > On Mon 27-02-17 11:02:09, Vitaly Kuznetsov wrote:
>> > [...]
>> >> I don't have anything new to add to the discussion happened last week
>> >> but I'd like to summarize my arguments against this change:
>> >>
>> >> 1) This patch doesn't solve any issue. Configuration option is not an
>> >> issue by itself, it is an option for distros to decide what they want to
>> >> ship: udev rule with known issues (legacy mode) or enable the new
>> >> option. Distro makers and users building their kernels should be able to
>> >> answer this simple question "do you want to automatically online all
>> >> newly added memory or not".
>> >
>> > OK, so could you be more specific? Distributions have no clue about
>> > which HW their kernel runs on so how can they possibly make a sensible
>> > decision here?
>>
>> They at least have an idea if they ship udev rule or not. I can also
>> imagine different choices for non-x86 architectures but I don't know
>> enough about them to have an opinion.
>
> I really do not follow. If they know whether they ship the udev rule
> then why do they need a kernel help at all? Anyway this global policy
> actually breaks some usecases. Say you would have a default set to
> online. What should user do if _some_ nodes should be online_movable?
> Or, say that HyperV or other hotplug based ballooning implementation
> really want to online the movable memory in order to have a realiable
> hotremove. Now you have a global policy which goes against it.
>
While I think that hotremove is a special case which really requires
manual intervention (at least to decide which memory goes NORMAL and
which MOVABLE), MEMORY_HOTPLUG_DEFAULT_ONLINE is probably not for it.
[snip]
>
>> The difference with real hardware is how the operation is performed:
>> with real hardware you need to take a DIMM, go to your server room, open
>> the box, insert DIMM, go back to your seat. Asking to do some manual
>> action to actually enable memory is kinda OK. The beauty of hypervisors
>> is that everything happens automatically (e.g. when the VM is running
>> out of memory).
>
> I do not see your point. Either you have some (semi)automatic way to
> balance memory in guest based on the memory pressure (let's call it
> ballooning) or this is an administration operation (say you buy more
> DIMs or pay more to your virtualization provider) and then it is up to
> the guest owner to tell what to do about that memory. In other words you
> really do not want to wait in the first case as you are under memory
> pressure which is _actively_ managed or this is much more relaxed
> environment.
I don't see a contradiction between what I say and what you say here :-)
Yes, there are case when we're not in a hurry and there are cases when
we can't wait.
>
>> >> 3) Kernel command line is not a viable choice, it is rather a debug
>> >> method.
>> >
>> > Why?
>> >
>>
>> Because we usually have just a few things there (root=, console=) and
>> the rest is used when something goes wrong or for 'special' cases, not
>> for the majority of users.
>
> auto online or even memory hotplug seems something that requires
> a special HW/configuration already so I fail to see your point. It is
> normal to put kernel parameters to override the default. And AFAIU
> default offline is a sensible default for the standard memory hotplug.
>
It depends how we define 'standard'. The point I'm trying to make is
that it's really common for VMs to use this technique while in hardware
(x86) world it is a rare occasion. The 'sensible default' may differ.
> [...]
>
>> >> 2) Adding new memory can (in some extreme cases) still fail as we need
>> >> some *other* memory before we're able to online the newly added
>> >> block. This is an issue to be solved and it is doable (IMO) with some
>> >> pre-allocation.
>> >
>> > you cannot preallocate for all the possible memory that can be added.
>>
>> For all, no, but for 1 next block - yes, and then I'll preallocate for
>> the next one.
>
> You are still thinking in the scope of your particular use case and I
> believe the whole thing is shaped around that very same thing and that
> is why it should have been rejected in the first place. Especially when
> that use case can be handled without user visible configuration knob.
I think my use case is broad enough. At least it applies to all
virtualization technoligies and not only to Hyper-V. But yes, I agree
that adding a parameter to add_memory() solves my particular use case as
well.
--
Vitaly
next prev parent reply other threads:[~2017-02-27 13:18 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 9:28 [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Michal Hocko
2017-02-27 10:02 ` Vitaly Kuznetsov
2017-02-27 10:21 ` Michal Hocko
2017-02-27 10:49 ` Vitaly Kuznetsov
2017-02-27 12:56 ` Michal Hocko
2017-02-27 13:17 ` Vitaly Kuznetsov [this message]
2017-02-27 11:25 ` Heiko Carstens
2017-02-27 11:50 ` Vitaly Kuznetsov
2017-02-27 15:43 ` Michal Hocko
2017-02-28 10:21 ` Heiko Carstens
2017-03-02 13:53 ` Igor Mammedov
2017-03-02 14:28 ` Michal Hocko
2017-03-02 17:03 ` Igor Mammedov
2017-03-03 8:27 ` Michal Hocko
2017-03-03 17:34 ` Igor Mammedov
2017-03-06 14:54 ` Michal Hocko
2017-03-07 12:40 ` Igor Mammedov
2017-03-09 12:54 ` Michal Hocko
2017-03-10 13:58 ` WTH is going on with memory hotplug sysf interface (was: Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks) Michal Hocko
2017-03-10 15:53 ` Michal Hocko
2017-03-10 19:00 ` Reza Arbab
2017-03-13 9:21 ` Michal Hocko
2017-03-13 14:58 ` Reza Arbab
2017-03-14 19:35 ` Andrea Arcangeli
2017-03-15 7:57 ` Michal Hocko
2017-03-13 15:11 ` Michal Hocko
2017-03-13 23:16 ` Andi Kleen
2017-03-10 17:39 ` WTH is going on with memory hotplug sysf interface Yasuaki Ishimatsu
2017-03-13 9:19 ` Michal Hocko
2017-03-14 16:05 ` YASUAKI ISHIMATSU
2017-03-14 16:20 ` Michal Hocko
2017-03-13 10:31 ` WTH is going on with memory hotplug sysf interface (was: Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks) Igor Mammedov
2017-03-13 10:43 ` Michal Hocko
2017-03-13 13:57 ` Igor Mammedov
2017-03-13 14:36 ` Michal Hocko
2017-03-13 10:55 ` [RFC PATCH] mm, hotplug: get rid of auto_online_blocks Igor Mammedov
2017-03-13 12:28 ` Michal Hocko
2017-03-13 12:54 ` Vitaly Kuznetsov
2017-03-13 13:19 ` Michal Hocko
2017-03-13 13:42 ` Vitaly Kuznetsov
2017-03-13 14:32 ` Michal Hocko
2017-03-13 15:10 ` Vitaly Kuznetsov
2017-03-14 13:20 ` Igor Mammedov
2017-03-15 7:53 ` Michal Hocko
2017-03-10 22:00 ` Daniel Kiper
2017-02-27 17:28 ` Reza Arbab
2017-02-27 17:34 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wpcbvkl7.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.kiper@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=kys@microsoft.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=mhocko@kernel.org \
--cc=rientjes@google.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).