[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21490d49-b2cf-a398-0609-8010bdb0b004@redhat.com>
Date: Thu, 23 Jul 2020 13:37:03 +0200
From: David Hildenbrand <david@...hat.com>
To: Roger Pau Monne <roger.pau@...rix.com>,
linux-kernel@...r.kernel.org
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
xen-devel@...ts.xenproject.org, linux-mm@...ck.org
Subject: Re: [PATCH 3/3] memory: introduce an option to force onlining of
hotplug memory
On 23.07.20 10:45, Roger Pau Monne wrote:
> Add an extra option to add_memory_resource that overrides the memory
> hotplug online behavior in order to force onlining of memory from
> add_memory_resource unconditionally.
>
> This is required for the Xen balloon driver, that must run the
> online page callback in order to correctly process the newly added
> memory region, note this is an unpopulated region that is used by Linux
> to either hotplug RAM or to map foreign pages from other domains, and
> hence memory hotplug when running on Xen can be used even without the
> user explicitly requesting it, as part of the normal operations of the
> OS when attempting to map memory from a different domain.
>
> Setting a different default value of memhp_default_online_type when
> attaching the balloon driver is not a robust solution, as the user (or
> distro init scripts) could still change it and thus break the Xen
> balloon driver.
I think we discussed this a couple of times before (even triggered by my
request), and this is responsibility of user space to configure. Usually
distros have udev rules to online memory automatically. Especially, user
space should eb able to configure *how* to online memory.
It's the admin/distro responsibility to configure this properly. In case
this doesn't happen (or as you say, users change it), bad luck.
E.g., virtio-mem takes care to not add more memory in case it is not
getting onlined. I remember hyper-v has similar code to at least wait a
bit for memory to get onlined.
Nacked-by: David Hildenbrand <david@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists