Thread (14 messages) 14 messages, 3 authors, 2021-03-08

Re: [PATCH v3 3/5] mm,memory_hotplug: Add kernel boot option to enable memmap_on_memory

From: Oscar Salvador <osalvador@suse.de>
Date: 2021-03-08 15:47:00
Also in: lkml

On Fri, Mar 05, 2021 at 04:35:08PM +0100, David Hildenbrand wrote:
On 04.03.21 11:00, Oscar Salvador wrote:
quoted
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 04545725f187..e626dab39c60 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -2794,6 +2794,20 @@
  			seconds.  Use this parameter to check at some
  			other rate.  0 disables periodic checking.
+	memory_hotplug.memmap_on_memory
+			[KNL,X86,ARM] Boolean flag to enable this feature.
Right now it can be set on any arch with memory hotplug, right? It's simply
not effective.
Right.
quoted
+			Format: {on | off (default)}
+			When enabled, memory to build the pages tables for the
+			memmap array describing the hot-added range will be taken
+			from the range itself, so the memmap page tables will be
+			self-hosted.
+			Since only single memory device ranges are supported at
+			the moment, this option is disabled by default because
+			it might have an impact on workloads that needs large
+			contiguous memory chunks.
+			The state of the flag can be read in
+			/sys/module/memory_hotplug/parameters/memmap_on_memory.
Maybe want to add that even if enabled, there are cases where it is not
effective?
Sure, I already added a hint.
quoted
+static bool memmap_on_memory __ro_after_init;
+module_param(memmap_on_memory, bool, 0444);
+MODULE_PARM_DESC(memmap_on_memory, "Enable memmap on memory for memory hotplug");
Wondering if this makes sense getting wrapped in

#ifdef CONFIG MHP_MEMMAP_ON_MEMORY

just a thought.
Definitely, will wrapp it with MHP_MEMMAP_ON_MEMORY.
LGTM

Reviewed-by: David Hildenbrand <redacted>
Thanks!


-- 
Oscar Salvador
SUSE L3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help