public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Bharata B Rao <bharata@linux•vnet.ibm.com>,
	linuxppc-dev@lists•ozlabs.org
Cc: nfont@linux•vnet.ibm.com,
	Bharata B Rao <bharata@linux•vnet.ibm.com>,
	aik@au1•ibm.com, david@gibson•dropbear.id.au
Subject: Re: [FIX,v2,2/2] powerpc,numa: Fix memory_hotplug_max()
Date: Tue, 21 Jun 2016 10:40:49 +1000 (AEST)	[thread overview]
Message-ID: <3rYTRP6HB5z9sCp@ozlabs.org> (raw)
In-Reply-To: <1463060055-24158-3-git-send-email-bharata@linux.vnet.ibm.com>

On Thu, 2016-12-05 at 13:34:15 UTC, Bharata B Rao wrote:
> memory_hotplug_max() uses hot_add_drconf_memory_max() to get maxmimum
> addressable memory by referring to ibm,dyanamic-memory property. There
> are three problems with the current approach:
> 
> 1 hot_add_drconf_memory_max() assumes that ibm,dynamic-memory includes
>   all the LMBs of the guest, but that is not true for PowerKVM which
>   populates only DR LMBs (LMBs that can be hotplugged/removed) in that
>   property.
> 2 hot_add_drconf_memory_max() multiplies lmb-size with lmb-count to arrive
>   at the max possible address. Since ibm,dynamic-memory doesn't include
>   RMA LMBs, the address thus obtained will be less than the actual max
>   address. For example, if max possible memory size is 32G, with lmb-size
>   of 256MB there can be 127 LMBs in ibm,dynamic-memory (1 LMB for RMA
>   which won't be present here).  hot_add_drconf_memory_max() would then
>   return the max addressable memory as 127 * 256MB = 31.75GB, the max
>   address should have been 32G which is what ibm,lrdr-capacity shows.
> 3 In PowerKVM, there can be a gap between the end of boot time RAM and
>   beginning of hotplug RAM area. So just multiplying lmb-count with
>   lmb-size will not provide the correct max possible address for PowerKVM.
> 
> This patch fixes 1 by using ibm,lrdr-capacity property to return the max
> addressable memory whenever the property is present. Then it fixes 2 & 3
> by fetching the address of the last LMB in ibm,dynamic-memory property.
> 
> Signed-off-by: Bharata B Rao <bharata@linux•vnet.ibm.com>
> Reviewed-by: David Gibson <david@gibson•dropbear.id.au>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/45b64ee64970dee9392229302e

cheers

  parent reply	other threads:[~2016-06-21  0:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 13:34 [FIX PATCH v2 0/2] Fix powerpc,numa: Fix memory_hotplug_max() Bharata B Rao
2016-05-12 13:34 ` [FIX PATCH v2 1/2] powerpc, numa: Fix whitespace in hot_add_drconf_memory_max() Bharata B Rao
2016-05-26  0:47   ` [FIX PATCH v2 1/2] powerpc,numa: " David Gibson
2016-06-21  0:40   ` [FIX, v2, 1/2] powerpc, numa: " Michael Ellerman
2016-05-12 13:34 ` [FIX PATCH v2 2/2] powerpc,numa: Fix memory_hotplug_max() Bharata B Rao
2016-05-26  0:50   ` David Gibson
2016-06-21  0:40   ` Michael Ellerman [this message]
2016-06-14  4:46 ` [FIX PATCH v2 0/2] Fix " Bharata B Rao
2016-06-14  5:19   ` Michael Ellerman
2016-06-14  5:46     ` Bharata B Rao

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=3rYTRP6HB5z9sCp@ozlabs.org \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=aik@au1$(echo .)ibm.com \
    --cc=bharata@linux$(echo .)vnet.ibm.com \
    --cc=david@gibson$(echo .)dropbear.id.au \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=nfont@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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