s390-mm-allocate-vmemmap-pages-from-self-contained-memory-range.patch removed from -mm tree
The quilt patch titled
Subject: s390/mm: allocate vmemmap pages from self-contained memory range
has been removed from the -mm tree. Its filename was
s390-mm-allocate-vmemmap-pages-from-self-contained-memory-range.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Sumanth Korikkar <[email protected]>
Subject: s390/mm: allocate vmemmap pages from self-contained memory range
Date: Mon, 8 Jan 2024 14:27:44 +0100
Allocate memory map (struct pages array) from the hotplugged memory range, rather than using system memory. The change addresses the issue where standby memory, when configured to be much larger than online memory, could potentially lead to ipl failure due to memory map allocation from online memory. For example, 16MB of memory map allocation is needed for a memory block size of 1GB and when standby memory is configured much larger than online memory, this could lead to ipl failure.
To address this issue, the solution involves introducing "memmap on memory" using the vmem_altmap structure on s390. Architectures that want to implement it should pass the altmap to the vmemmap_populate() function and its associated callchain. This enhancement is discussed in commit 4b94ffdc4163 ("x86, mm: introduce vmem_altmap to augment vmemmap_populate()")
Provide "memmap on memory" support for s390 by passing the altmap in vmemmap_populate() and its callchain. The allocation path is described as follows:
* When altmap is NULL in vmemmap_populate(), memory map allocation occurs using the existing vmemmap_alloc_block_buf().
* When altmap is not NULL in vmemmap_populate(), memory map allocation still uses vmemmap_alloc_block_buf(), but this function internally calls altmap_alloc_block_buf().
For deallocation, the process is outlined as follows:
* When altmap is NULL in vmemmap_free(), memory map deallocation happens through free_pages().
* When altmap is not NULL in vmemmap_free(), memory map deallocation occurs via vmem_altmap_free().
While memory map allocation is primarily handled through the self-contained memory map range, there might still be a small amount of system memory allocation required for vmemmap pagetables. To mitigate this impact, this feature will be limited to machines with EDAT1 support.
---
arch/s390/mm/init.c | 3 -- arch/s390/mm/vmem.c | 62 +++++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 30 deletions(-)
arch/s390/mm/init.c renamed from arch/s390/mm/init.c~s390-mm-allocate-vmemmap-pages-from-self-contained-memory-range +0 -3
@@ -281,9 +281,6 @@ int arch_add_memory(int nid, u64 start,unsigned long size_pages =PFN_DOWN (size);int rc; -if (WARN_ON_ONCE (params->altmap)) -return -EINVAL ; -if (WARN_ON_ONCE (params->pgprot.pgprot !=PAGE_KERNEL .pgprot))return -EINVAL ;
arch/s390/mm/vmem.c renamed from arch/s390/mm/vmem.c~s390-mm-allocate-vmemmap-pages-from-self-contained-memory-range +35 -27
194 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are