All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 083/117] memory_hotplug: introduce memhp_default_state= command line parameter
@ 2016-05-20  0:13 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-05-20  0:13 UTC (permalink / raw)
  To: torvalds, mm-commits, akpm, vkuznets, corbet, dan.j.williams,
	david.vrabel, imammedo, kirill.shutemov, lennart, mgorman,
	rientjes

From: Vitaly Kuznetsov <vkuznets@redhat.com>
Subject: memory_hotplug: introduce memhp_default_state= command line parameter

CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE specifies the default value for the
memory hotplug onlining policy.  Add a command line parameter to make it
possible to override the default.  It may come handy for debug and testing
purposes.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/kernel-parameters.txt |    8 ++++++++
 mm/memory_hotplug.c                 |   11 +++++++++++
 2 files changed, 19 insertions(+)

diff -puN Documentation/kernel-parameters.txt~memory_hotplug-introduce-memhp_default_state=-command-line-parameter Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt~memory_hotplug-introduce-memhp_default_state=-command-line-parameter
+++ a/Documentation/kernel-parameters.txt
@@ -2161,6 +2161,14 @@ bytes respectively. Such letter suffixes
 			[KNL,SH] Allow user to override the default size for
 			per-device physically contiguous DMA buffers.
 
+        memhp_default_state=online/offline
+			[KNL] Set the initial state for the memory hotplug
+			onlining policy. If not specified, the default value is
+			set according to the
+			CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE kernel config
+			option.
+			See Documentation/memory-hotplug.txt.
+
 	memmap=exactmap	[KNL,X86] Enable setting of an exact
 			E820 memory map, as specified by the user.
 			Such memmap=exactmap lines can be constructed based on
diff -puN mm/memory_hotplug.c~memory_hotplug-introduce-memhp_default_state=-command-line-parameter mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~memory_hotplug-introduce-memhp_default_state=-command-line-parameter
+++ a/mm/memory_hotplug.c
@@ -85,6 +85,17 @@ bool memhp_auto_online = true;
 #endif
 EXPORT_SYMBOL_GPL(memhp_auto_online);
 
+static int __init setup_memhp_default_state(char *str)
+{
+	if (!strcmp(str, "online"))
+		memhp_auto_online = true;
+	else if (!strcmp(str, "offline"))
+		memhp_auto_online = false;
+
+	return 1;
+}
+__setup("memhp_default_state=", setup_memhp_default_state);
+
 void get_online_mems(void)
 {
 	might_sleep();
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-20  0:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20  0:13 [patch 083/117] memory_hotplug: introduce memhp_default_state= command line parameter akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.