All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: bharata@linux.vnet.ibm.com
Cc: David Gibson <david@gibson.dropbear.id.au>,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	Igor Mammedov <imammedo@redhat.com>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	nfont@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support
Date: Fri, 29 Apr 2016 10:22:03 +0200	[thread overview]
Message-ID: <572319AB.5000004@redhat.com> (raw)
In-Reply-To: <20160429065939.GB12284@in.ibm.com>

On 29.04.2016 08:59, Bharata B Rao wrote:
> On Fri, Apr 29, 2016 at 08:45:37AM +0200, Thomas Huth wrote:
>> On 29.04.2016 05:24, David Gibson wrote:
>>> On Tue, Apr 26, 2016 at 04:03:37PM -0500, Michael Roth wrote:
>> ...
>>>> 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?
>>>
>>> Urgh.. I can see the benefit, but I'm a bit uneasy about making the
>>> DIMM semantics different in this way on Power.
>>>
>>> I'm shoehorning the PAPR DR memory mechanism into the qemu DIMM model
>>> was a good idea after all.
>>
>> Ignorant question (sorry, I really don't have much experience yet here):
>> Could we maybe align the size of the LMBs with the size of the DIMMs?
>> E.g. make the LMBs bigger or the DIMMs smaller, so that they match?
> 
> Should work, but the question is what should be the right size so that
> we have good granularity of hotplug but also not run out of mem slots
> thereby limiting us on the maxmem. I remember you changed the memslots
> to 512 in KVM, but we are yet to move up from 32 in QEMU for sPAPR though.

Half of the slots should be "reserved" for PCI and other stuff, so we
could use 256 for memory - that way we would also on the same level as
x86 which also uses 256 memslots here, as far as I know.

Anyway, couldn't we simply calculate the SPAPR_MEMORY_BLOCK_SIZE
dynamically, according to the maxmem and slot values that the user
specified? So that SPAPR_MEMORY_BLOCK_SIZE simply would match the DIMM
size? ... or is there some constraint that I've missed so that
SPAPR_MEMORY_BLOCK_SIZE has to be a compile-time #defined value?

 Thomas

  reply	other threads:[~2016-04-29  8:28 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
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 [this message]
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=572319AB.5000004@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.