Re: [resend] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-05-08 Thread Michael Ellerman
On Tue, 2018-05-01 at 02:57:25 UTC, Balbir Singh wrote: > This commit was a stop-gap to prevent crashes on hotunplug, caused by > the mismatch between the 1G mappings used for the linear mapping and the > memory block size. Those issues are now resolved because we split the > linear mapping at hotu

Re: [resend] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-05-01 Thread Balbir Singh
On Wed, 2 May 2018 15:10:33 +1000 rashmica wrote: > Tested hot-unplugging dimm device on radix guest on p9 host with KVM. > > > On 01/05/18 12:57, Balbir Singh wrote: > > This commit was a stop-gap to prevent crashes on hotunplug, caused by > > the mismatch between the 1G mappings used for the

Re: [resend] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-05-01 Thread rashmica
Tested hot-unplugging dimm device on radix guest on p9 host with KVM. On 01/05/18 12:57, Balbir Singh wrote: > This commit was a stop-gap to prevent crashes on hotunplug, caused by > the mismatch between the 1G mappings used for the linear mapping and the > memory block size. Those issues are now

[resend] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Balbir Singh
This commit was a stop-gap to prevent crashes on hotunplug, caused by the mismatch between the 1G mappings used for the linear mapping and the memory block size. Those issues are now resolved because we split the linear mapping at hotunplug time if necessary, as implemented in commit 4dd5f8a99e79 (

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Balbir Singh
On Mon, Apr 30, 2018 at 8:43 PM, Michael Ellerman wrote: > Balbir Singh writes: >> This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. > > Firstly everything here only applies to Radix, so we need to say that. The subject mentions it :) > >> The commit above changed the memblock size

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Michael Ellerman
Nicholas Piggin writes: > On Mon, 30 Apr 2018 18:34:32 +1000 > Balbir Singh wrote: > >> This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. >> >> The commit above changed the memblock size to 1GiB, which did some >> nice things like create fewer TLB entries for mapping memory at >> th

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Michael Ellerman
Balbir Singh writes: > This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. Firstly everything here only applies to Radix, so we need to say that. > The commit above changed the memblock size to 1GiB, which did some > nice things like create fewer TLB entries for mapping memory at > the

Re: [PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Nicholas Piggin
On Mon, 30 Apr 2018 18:34:32 +1000 Balbir Singh wrote: > This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. > > The commit above changed the memblock size to 1GiB, which did some > nice things like create fewer TLB entries for mapping memory at > the time of hotplug. The downside is t

[PATCH] Revert "powerpc/powernv: Increase memory block size to 1GB on radix"

2018-04-30 Thread Balbir Singh
This reverts commit 53ecde0b9126ff140abe3aefd7f0ec64d6fa36b0. The commit above changed the memblock size to 1GiB, which did some nice things like create fewer TLB entries for mapping memory at the time of hotplug. The downside is that it changes the granularity at which memory can be hot-plugged a

Re: powerpc/powernv: Increase memory block size to 1GB on radix

2017-10-06 Thread Michael Ellerman
On Thu, 2017-09-07 at 05:05:51 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > Memory hot unplug on PowerNV radix hosts is broken. Our memory block > size is 256MB but since we map the linear region with very large pages, > each pte we tear down maps 1GB. > > A hot unplug of one 256MB me

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-09 Thread Michael Ellerman
We should do the 1G block size as a fix, and backport it, and then make the hot unplug code smarter. cheers On 8 September 2017 11:15:47 am AEST, Anton Blanchard wrote: >Hi Reza, > >> I may be misunderstanding this, but what if we did something like x86 > >> does? When trying to unplug a region

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-08 Thread Balbir Singh
On Thu, Sep 7, 2017 at 5:21 PM, Benjamin Herrenschmidt wrote: > On Thu, 2017-09-07 at 15:17 +1000, Anton Blanchard wrote: >> Hi, >> >> > There is a similar issue being worked on w.r.t pseries. >> > >> > https://lkml.kernel.org/r/1502357028-27465-1-git-send-email-bhar...@linux.vnet.ibm.com >> > >>

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-07 Thread Anton Blanchard
Hi Reza, > I may be misunderstanding this, but what if we did something like x86 > does? When trying to unplug a region smaller than the mapping, they > fill that part of the pagetable with 0xFD instead of freeing the > whole thing. Once the whole thing is 0xFD, free it. > > See arch/x86/mm/init

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-07 Thread Reza Arbab
On Thu, Sep 07, 2017 at 05:17:41AM +, Anton Blanchard wrote: But all of memory on PowerNV should be able to be hot unplugged, so there are two options as I see it - either increase the memory block size, or map everything with 2MB pages. I may be misunderstanding this, but what if we did so

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-07 Thread Benjamin Herrenschmidt
On Thu, 2017-09-07 at 15:17 +1000, Anton Blanchard wrote: > Hi, > > > There is a similar issue being worked on w.r.t pseries. > > > > https://lkml.kernel.org/r/1502357028-27465-1-git-send-email-bhar...@linux.vnet.ibm.com > > > > The question is should we map these regions ? ie, we need to tell t

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-06 Thread Anton Blanchard
Hi, > There is a similar issue being worked on w.r.t pseries. > > https://lkml.kernel.org/r/1502357028-27465-1-git-send-email-bhar...@linux.vnet.ibm.com > > The question is should we map these regions ? ie, we need to tell the > kernel memory region that we would like to hot unplug later so tha

Re: [PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-06 Thread Aneesh Kumar K.V
On 09/07/2017 10:35 AM, Anton Blanchard wrote: From: Anton Blanchard Memory hot unplug on PowerNV radix hosts is broken. Our memory block size is 256MB but since we map the linear region with very large pages, each pte we tear down maps 1GB. A hot unplug of one 256MB memory block results in

[PATCH] powerpc/powernv: Increase memory block size to 1GB on radix

2017-09-06 Thread Anton Blanchard
From: Anton Blanchard Memory hot unplug on PowerNV radix hosts is broken. Our memory block size is 256MB but since we map the linear region with very large pages, each pte we tear down maps 1GB. A hot unplug of one 256MB memory block results in 768MB of memory getting unintentionally unmapped. A