History

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

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. At this point we are likely to oops. Fix this by increasing our memory block size to 1GB on PowerNV radix hosts.

Anton Blanchard committed 9 years ago

Commit 53ecde01 parent 7c6a4f31 file · +9 −1Browse files

Unified · Split

arch/powerpc/platforms/powernv/setup.c+9−1
@@ -272,7 +272,15 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary) · 271 unmodified lines
272#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE272#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
273static unsigned long pnv_memory_block_size(void)273static unsigned long pnv_memory_block_size(void)
274{274{
275 return 256UL * 1024 * 1024;275 /*
276 * We map the kernel linear region with 1GB large pages on radix. For
277 * memory hot unplug to work our memory block size must be at least
278 * this size.
279 */
280 if (radix_enabled())
281 return 1UL * 1024 * 1024 * 1024;
282 else
283 return 256UL * 1024 * 1024;
276}284}
277#endif285#endif
278 286

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t