Skip to contentSkip to conversation

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

PATCH RESEND Applied Balbir Singh 3 participants 4 messages May 1, 2018 – May 8, 2018 PowerPC

lore
Share & tools
lore
#0 lore raw

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

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 ("powerpc/mm/radix: Split linear mapping on hot-unplug").

---

Resend with a newer commit message grabbed from an email sent by mpe.

 arch/powerpc/platforms/powernv/setup.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/powerpc/platforms/powernv/setup.c +1 -9
index ef8c9ce53a61..fa63d3fff14c 100644
@@ -356,15 +356,7 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
 static unsigned long pnv_memory_block_size(void)
 {
-	/*
-	 * We map the kernel linear region with 1GB large pages on radix. For
-	 * memory hot unplug to work our memory block size must be at least
-	 * this size.
-	 */
-	if (radix_enabled())
-		return 1UL * 1024 * 1024 * 1024;
-	else
-		return 256UL * 1024 * 1024;
+	return 256UL * 1024 * 1024;
 }
 #endif
 
Signature · 1 line
2.13.6
Tested-by on v1 1/1
#1 lore raw

Tested hot-unplugging dimm device on radix guest on p9 host with KVM.

Quoted 8 lines · 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 ("powerpc/mm/radix: Split linear mapping on hot-unplug").

Quoted 28 lines

---

Resend with a newer commit message grabbed from an email sent by mpe.

 arch/powerpc/platforms/powernv/setup.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/powerpc/platforms/powernv/setup.c +1 -9
index ef8c9ce53a61..fa63d3fff14c 100644
@@ -356,15 +356,7 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
 static unsigned long pnv_memory_block_size(void)
 {
-	/*
-	 * We map the kernel linear region with 1GB large pages on radix. For
-	 * memory hot unplug to work our memory block size must be at least
-	 * this size.
-	 */
-	if (radix_enabled())
-		return 1UL * 1024 * 1024 * 1024;
-	else
-		return 256UL * 1024 * 1024;
+	return 256UL * 1024 * 1024;
 }
 #endif
 
author Tested-by
#2 lore raw
Quoted 10 lines · On Wed, 2 May 2018 15:10:33 +1000 rashmica <[email protected]> wrote:

Tested hot-unplugging dimm device on radix guest on p9 host with KVM.

Quoted 6 lines · 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 ("powerpc/mm/radix: Split linear mapping on hot-unplug").

Quoted 3 lines
Quoted 2 lines

I tested the following:

a. memtrace - enable a region smaller than 1G, which split the mappings as expected.
b. Checked linear mapping is 1G and not impacted by the revert c. I can hotplug sizes less than 1G via the probe method

Quoted 29 lines
Quoted 28 lines

---

Resend with a newer commit message grabbed from an email sent by mpe.

 arch/powerpc/platforms/powernv/setup.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/powerpc/platforms/powernv/setup.c +1 -9
index ef8c9ce53a61..fa63d3fff14c 100644
@@ -356,15 +356,7 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
 static unsigned long pnv_memory_block_size(void)
 {
-	/*
-	 * We map the kernel linear region with 1GB large pages on radix. For
-	 * memory hot unplug to work our memory block size must be at least
-	 * this size.
-	 */
-	if (radix_enabled())
-		return 1UL * 1024 * 1024 * 1024;
-	else
-		return 256UL * 1024 * 1024;
+	return 256UL * 1024 * 1024;
 }
 #endif
 
#3 lore raw
In reply to Balbir Singh
Quoted 10 lines · 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 ("powerpc/mm/radix: Split linear mapping on hot-unplug").

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7acf50e4efa60270edcb95107f660f

cheers