Skip to contentSkip to conversation

mm-memory_hotplug-support-memmap_on_memory-when-memmap-is-not-aligned-to-pageblocks.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 21, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/memory_hotplug: support memmap_on_memory when memmap is not aligned to pageblocks
has been removed from the -mm tree. Its filename was
mm-memory_hotplug-support-memmap_on_memory-when-memmap-is-not-aligned-to-pageblocks.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: "Aneesh Kumar K.V" <[email protected]>
Subject: mm/memory_hotplug: support memmap_on_memory when memmap is not aligned to pageblocks
Date: Tue, 8 Aug 2023 14:44:59 +0530

Currently, memmap_on_memory feature is only supported with memory block sizes that result in vmemmap pages covering full page blocks. This is because memory onlining/offlining code requires applicable ranges to be pageblock-aligned, for example, to set the migratetypes properly.

This patch helps to lift that restriction by reserving more pages than required for vmemmap space. This helps the start address to be page block aligned with different memory block sizes. Using this facility implies the kernel will be reserving some pages for every memoryblock. This allows the memmap on memory feature to be widely useful with different memory block size values.

For ex: with 64K page size and 256MiB memory block size, we require 4 pages to map vmemmap pages, To align things correctly we end up adding a reserve of 28 pages. ie, for every 4096 pages 28 pages get reserved.

---

 Documentation/admin-guide/mm/memory-hotplug.rst |   12 +
 mm/memory_hotplug.c                             |  120 +++++++++++---
 2 files changed, 113 insertions(+), 19 deletions(-)
Documentation/admin-guide/mm/memory-hotplug.rst renamed from Documentation/admin-guide/mm/memory-hotplug.rst~mm-memory_hotplug-support-memmap_on_memory-when-memmap-is-not-aligned-to-pageblocks +12 -0
@@ -433,6 +433,18 @@ The following module parameters are curr
 				 memory in a way that huge pages in bigger
 				 granularity cannot be formed on hotplugged
 				 memory.
+
+				 With value "force" it could result in memory
+				 wastage due to memmap size limitations. For
+				 example, if the memmap for a memory block
+				 requires 1 MiB, but the pageblock size is 2
+				 MiB, 1 MiB of hotplugged memory will be wasted.
+				 Note that there are still cases where the
+				 feature cannot be enforced: for example, if the
+				 memmap is smaller than a single page, or if the
+				 architecture does not support the forced mode
+				 in all configurations.
+
 ``online_policy``		 read-write: Set the basic policy used for
 				 automatic zone selection when onlining memory
 				 blocks without specifying a target zone.
mm/memory_hotplug.c renamed from mm/memory_hotplug.c~mm-memory_hotplug-support-memmap_on_memory-when-memmap-is-not-aligned-to-pageblocks +101 -19

175 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are