From: Thomas Huth <thuth@redhat.com>
To: Michael Roth <mdroth@linux.vnet.ibm.com>,
Igor Mammedov <imammedo@redhat.com>,
Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: nfont@linux.vnet.ibm.com, qemu-ppc@nongnu.org,
qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support
Date: Wed, 27 Apr 2016 08:54:34 +0200 [thread overview]
Message-ID: <5720622A.2040407@redhat.com> (raw)
In-Reply-To: <20160426210337.11723.83860@loki>
On 26.04.2016 23:03, Michael Roth wrote:
> Quoting Igor Mammedov (2016-04-26 02:52:36)
>> On Tue, 26 Apr 2016 10:39:23 +0530
>> Bharata B Rao <bharata@linux.vnet.ibm.com> wrote:
>>
>>> On Mon, Apr 25, 2016 at 11:20:50AM +0200, Igor Mammedov wrote:
>>>> On Wed, 16 Mar 2016 10:11:54 +0530
>>>> Bharata B Rao <bharata@linux.vnet.ibm.com> wrote:
>>>>
>>>>> On Wed, Mar 16, 2016 at 12:36:05PM +1100, David Gibson wrote:
>>>>>> On Tue, Mar 15, 2016 at 10:08:56AM +0530, Bharata B Rao wrote:
>>>>>>> Add support to hot remove pc-dimm memory devices.
>>>>>>>
>>>>>>> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
>>>>>>
>>>>>> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
>>>>>>
>>>>>> Looks correct, but again, needs to wait on the PAPR change.
>>>> [...]
>>>>>
>>>>> While we are here, I would also like to get some opinion on the real
>>>>> need for memory unplug. Is there anything that memory unplug gives us
>>>>> which memory ballooning (shrinking mem via ballooning) can't give ?
>>>> Sure ballooning can complement memory hotplug but turning it on would
>>>> effectively reduce hotplug to balloning as it would enable overcommit
>>>> capability instead of hard partitioning pc-dimms provides. So one
>>>> could just use ballooning only and not bother with hotplug at all.
>>>>
>>>> On the other hand memory hotplug/unplug (at least on x86) tries
>>>> to model real hardware, thus removing need in paravirt ballooning
>>>> solution in favor of native guest support.
>>>
>>> Thanks for your views.
>>>
>>>>
>>>> PS:
>>>> Guest wise, currently hot-unplug is not well supported in linux,
>>>> i.e. it's not guarantied that guest will honor unplug request
>>>> as it may pin dimm by using it as a non migratable memory. So
>>>> there is something to work on guest side to make unplug more
>>>> reliable/guarantied.
>>>
>>> In the above scenario where the guest doesn't allow removal of certain
>>> parts of DIMM memory, what is the expected behaviour as far as QEMU
>>> DIMM device is concerned ? I seem to be running into this situation
>>> very often with PowerPC mem unplug where I am left with a DIMM device
>>> that has only some memory blocks released. In this situation, I would like
>>> to block further unplug requests on the same device, but QEMU seems
>>> to allow more such unplug requests to come in via the monitor. So
>>> qdev won't help me here ? Should I detect such condition from the
>>> machine unplug() handler and take required action ?
>> I think offlining is a guests task along with recovering from
>> inability to offline (i.e. offline all + eject or restore original state).
>> QUEM does it's job by notifying guest what dimm it wants to remove
>> and removes it when guest asks it (at least in x86 world).
>
> In the case of pseries, the DIMM abstraction isn't really exposed to
> the guest, but rather the memory blocks we use to make the backing
> memdev memory available to the guest. During unplug, the guest
> completely releases these blocks back to QEMU, and if it can only
> release a subset of what's requested it does not attempt to recover.
> We can potentially change that behavior on the guest side, since
> partially-freed DIMMs aren't currently useful on the host-side...
>
> But, in the case of pseries, I wonder if it makes sense to maybe go
> ahead and MADV_DONTNEED the ranges backing these released blocks so the
> host can at least partially reclaim the memory from a partially
> unplugged DIMM?
Sounds like this could be a good compromise.
Thomas
next prev parent reply other threads:[~2016-04-27 6:54 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 4:38 [Qemu-devel] [RFC PATCH v2 0/2] spapr: Memory hot-unplug support Bharata B Rao
2016-03-15 4:38 ` [Qemu-devel] [RFC PATCH v2 1/2] spapr: Add DRC count indexed hotplug identifier type Bharata B Rao
2016-03-16 1:29 ` David Gibson
2016-03-17 16:03 ` Michael Roth
2016-03-15 4:38 ` [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support Bharata B Rao
2016-03-16 1:36 ` David Gibson
2016-03-16 4:41 ` Bharata B Rao
2016-03-16 5:11 ` David Gibson
2016-03-23 3:22 ` David Gibson
2016-03-24 14:15 ` Nathan Fontenot
2016-03-29 4:41 ` David Gibson
2016-04-25 9:20 ` Igor Mammedov
2016-04-26 5:09 ` Bharata B Rao
2016-04-26 7:52 ` Igor Mammedov
2016-04-26 21:03 ` Michael Roth
2016-04-27 6:54 ` Thomas Huth [this message]
2016-04-27 13:37 ` Igor Mammedov
2016-04-27 13:59 ` Thomas Huth
2016-04-27 14:34 ` Igor Mammedov
2016-04-27 19:07 ` Michael Roth
2016-04-28 7:55 ` Igor Mammedov
2016-04-27 14:24 ` Bharata B Rao
2016-04-29 3:28 ` David Gibson
2016-04-29 8:42 ` Igor Mammedov
2016-04-29 3:24 ` David Gibson
2016-04-29 6:45 ` Thomas Huth
2016-04-29 6:59 ` Bharata B Rao
2016-04-29 8:22 ` Thomas Huth
2016-04-29 8:30 ` Igor Mammedov
2016-04-29 11:01 ` Thomas Huth
2016-04-29 10:11 ` David Gibson
2016-05-27 15:48 ` [Qemu-devel] [RFC PATCH v2 0/2] " Thomas Huth
2016-05-27 16:32 ` Michael Roth
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=5720622A.2040407@redhat.com \
--to=thuth@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=imammedo@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=nfont@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.