qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v3 21/24] spapr: Initialize hotplug memory a


From: Bharata B Rao
Subject: Re: [Qemu-devel] [RFC PATCH v3 21/24] spapr: Initialize hotplug memory address space
Date: Thu, 7 May 2015 10:31:35 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, May 07, 2015 at 11:12:36AM +1000, David Gibson wrote:
> On Wed, May 06, 2015 at 01:53:05PM +0530, Bharata B Rao wrote:
> > On Tue, May 05, 2015 at 10:48:50AM +0200, Igor Mammedov wrote:
> > > On Fri, 24 Apr 2015 12:17:43 +0530
> > > Bharata B Rao <address@hidden> wrote:
<snip>
> > > 
> > > > Initialize a hotplug memory region under which all the hotplugged
> > > > memory is accommodated. Also enable memory hotplug by setting
> > > > CONFIG_MEM_HOTPLUG.
> > > > 
> > > >  }
> > > >  
> > > >  static void ppc_cpu_do_nmi_on_cpu(void *arg)
> > > > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> > > > index ecac6e3..53560e9 100644
> > > > --- a/include/hw/ppc/spapr.h
> > > > +++ b/include/hw/ppc/spapr.h
> > > > @@ -542,6 +542,18 @@ struct sPAPREventLogEntry {
> > > >  
> > > >  #define SPAPR_MEMORY_BLOCK_SIZE (1 << 28) /* 256MB */
> > > >  
> > > > +/*
> > > > + * This defines the maximum number of DIMM slots we can have for sPAPR
> > > > + * guest. This is not defined by sPAPR but we are defining it to 4096 
> > > > slots
> > > > + * here. With the worst case addition of SPAPR_MEMORY_BLOCK_SIZE
> > > > + * (256MB) memory per slot, we should be able to support 1TB of guest
> > > > + * hotpluggable memory.
> > > > + */
> > > > +#define SPAPR_MAX_RAM_SLOTS     (1ULL << 12)
> > > why not write 4096 instead of (1ULL << 12), much easier to read.
> > 
> > Sure.
> > 
> > > 
> > > BTW:
> > > KVM supports upto 509 memory slots including slots consumed by
> > > initial memory.
> > 
> > I see that PowerPC defaults to 32 slots. So having 4096 slots is really
> > pointless then ? So to ensure more hot-pluggable memory space is available
> > should I be increasing the size of the minimum pluggable memory in a
> > dimm slot (as defined by SPAPR_MEMORY_BLOCK_SIZE above) ?
> 
> That seems a bit nasty, since then the granularity of adding blocks
> will be enormous for small guests as well.
> 
> Is it possible to increase the maximum size of a single DIMM, but not
> the minimum?  That way you can still do small inserts for small
> guests.  To get the full RAM for big guests youd have to insert big
> chunks though, due to the limited number of slots.

The maximum memory that can be plugged into a slot is not limited iiuc,
so smaller and bigger guests can use memory sizes appropriate for them.
Only the minimum size is restricted to SPAPR_MEMORY_BLOCK_SIZE (256M).

So I guess I should just stick to 32 slots here for PowerPC memory
hotplug implementation.

Regards,
Bharata.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]