Skip to contentSkip to conversation

powerpc/mm: movable hotplug memory nodes

PATCH Superseded Reza Arbab 5 participants 16 messages Sep 25, 2016 – Oct 4, 2016

Subsystems (5)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Reza Arbab

author
#0 lore raw

v3 cover powerpc/mm: movable hotplug memory nodes

These changes enable the dynamic creation of movable nodes on power.

On x86, the ACPI SRAT memory affinity structure can mark memory hotpluggable, allowing the kernel to possibly create movable nodes at boot.

While power has no analog of this SRAT information, we can still create a movable memory node, post boot, by hotplugging all of the node's memory into ZONE_MOVABLE.

We provide a way to describe the extents and numa associativity of such a node in the device tree, while deferring the memory addition to take place through hotplug.

In v1, this patchset introduced a new dt compatible id to explicitly create a memoryless node at boot. Here, things have been simplified to be applicable regardless of the status of node hotplug on power. We still intend to enable hotadding a pgdat, but that's now untangled as a separate topic.

v3:
* Use Rob Herring's suggestions to improve the node availability check.

* More verbose commit log in the patch enabling CONFIG_MOVABLE_NODE.

* Add a patch to restore top-down allocation the way x86 does.

v2:
* http://lkml.kernel.org/r/[email protected]

* Use the "status" property of standard dt memory nodes instead of introducing a new "ibm,hotplug-aperture" compatible id.

* Remove the patch which explicitly creates a memoryless node. This set no longer has any bearing on whether the pgdat is created at boot or at the time of memory addition.

v1:
* http://lkml.kernel.org/r/[email protected]

Reza Arbab (5):
drivers/of: introduce of_fdt_is_available() drivers/of: do not add memory for unavailable nodes powerpc/mm: allow memory hotplug into a memoryless node powerpc/mm: restore top-down allocation when using movable_node
mm: enable CONFIG_MOVABLE_NODE on powerpc

 Documentation/kernel-parameters.txt |  2 +-
 arch/powerpc/mm/numa.c              | 16 ++++------------
 drivers/of/fdt.c                    | 29 ++++++++++++++++++++++++++---
 include/linux/of_fdt.h              |  2 ++
 mm/Kconfig                          |  2 +-
 5 files changed, 34 insertions(+), 17 deletions(-)
Signature · 7 lines
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#1 lore raw

PATCH v3 1/5 drivers/of: introduce of_fdt_is_available()

In __fdt_scan_reserved_mem(), the availability of a node is determined by testing its "status" property.

Move this check into its own function, borrowing logic from the unflattened version, of_device_is_available().

Another caller will be added in a subsequent patch.

---
 drivers/of/fdt.c       | 26 +++++++++++++++++++++++---
 include/linux/of_fdt.h |  2 ++
 2 files changed, 25 insertions(+), 3 deletions(-)
drivers/of/fdt.c +23 -3
index 085c638..9241c6e 100644
@@ -151,6 +151,23 @@ int of_fdt_match(const void *blob, unsigned long node,
 	return score;
 }
 
+bool of_fdt_is_available(const void *blob, unsigned long node)
+{
+	const char *status;
+	int statlen;
+
+	status = fdt_getprop(blob, node, "status", &statlen);
+	if (!status)
+		return true;
+
+	if (statlen) {
+		if (!strcmp(status, "okay") || !strcmp(status, "ok"))
+			return true;
+	}
+
+	return false;
+}
+
 static void *unflatten_dt_alloc(void **mem, unsigned long size,
 				       unsigned long align)
 {
@@ -647,7 +664,6 @@ static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname,
 					  int depth, void *data)
 {
 	static int found;
-	const char *status;
 	int err;
 
 	if (!found && depth == 1 && strcmp(uname, "reserved-memory") == 0) {
@@ -667,8 +683,7 @@ static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname,
 		return 1;
 	}
 
-	status = of_get_flat_dt_prop(node, "status", NULL);
-	if (status && strcmp(status, "okay") != 0 && strcmp(status, "ok") != 0)
+	if (!of_flat_dt_is_available(node))
 		return 0;
 
 	err = __reserved_mem_reserve_reg(node, uname);
@@ -809,6 +824,11 @@ int __init of_flat_dt_match(unsigned long node, const char *const *compat)
 	return of_fdt_match(initial_boot_params, node, compat);
 }
 
+bool __init of_flat_dt_is_available(unsigned long node)
+{
+	return of_fdt_is_available(initial_boot_params, node);
+}
+
 struct fdt_scan_status {
 	const char *name;
 	int namelen;
include/linux/of_fdt.h +2 -0
index 26c3302..49e0b8f 100644
@@ -37,6 +37,7 @@ extern bool of_fdt_is_big_endian(const void *blob,
 				 unsigned long node);
 extern int of_fdt_match(const void *blob, unsigned long node,
 			const char *const *compat);
+extern bool of_fdt_is_available(const void *blob, unsigned long node);
 extern void *of_fdt_unflatten_tree(const unsigned long *blob,
 				   struct device_node *dad,
 				   struct device_node **mynodes);
@@ -59,6 +60,7 @@ extern const void *of_get_flat_dt_prop(unsigned long node, const char *name,
 				       int *size);
 extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
 extern int of_flat_dt_match(unsigned long node, const char *const *matches);
+extern bool of_flat_dt_is_available(unsigned long node);
 extern unsigned long of_get_flat_dt_root(void);
 extern int of_get_flat_dt_size(void);
 
Signature · 7 lines
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Acked-by on v3 1/5
#2 lore raw

Re: [PATCH v3 1/5] drivers/of: introduce of_fdt_is_available()

Quoted 19 lines · Reza Arbab

In __fdt_scan_reserved_mem(), the availability of a node is determined by testing its "status" property.

Move this check into its own function, borrowing logic from the unflattened version, of_device_is_available().

Another caller will be added in a subsequent patch.

---
 drivers/of/fdt.c       | 26 +++++++++++++++++++++++---
 include/linux/of_fdt.h |  2 ++
 2 files changed, 25 insertions(+), 3 deletions(-)
drivers/of/fdt.c +0 -0
index 085c638..9241c6e 100644

drivers/of/fdt.c int of_fdt_match(const void *blob, unsigned long node, · line 154

Quoted 4 lines
drivers/of/fdt.c +1 -0
@@ -151,6 +151,23 @@ int of_fdt_match(const void *blob, unsigned long node,
        return score;
 }
 
+bool of_fdt_is_available(const void *blob, unsigned long node)

of_fdt_device_is_available

[...]

drivers/of/fdt.c int __init of_flat_dt_match(unsigned long node, const char *const *compat) · line 827

Quoted 1 line
drivers/of/fdt.c +1 -0
+bool __init of_flat_dt_is_available(unsigned long node)

And of_flat_dt_device_is_available

With that,

author
#3 lore raw

PATCH v3 2/5 drivers/of: do not add memory for unavailable nodes

In reply to Reza Arbab

Respect the standard dt "status" property when scanning memory nodes in early_init_dt_scan_memory(), so that if the node is unavailable, no memory will be added.

The use case at hand is accelerator or device memory, which may be unusable until post-boot initialization of the memory link. Such a node can be described in the dt as any other, given its status is "disabled". Per the device tree specification,

"disabled"
Indicates that the device is not presently operational, but it might become operational in the future (for example, something is not plugged in, or switched off).

Once such memory is made operational, it can then be hotplugged.

---
 drivers/of/fdt.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/of/fdt.c +3 -0
index 9241c6e..59b772a 100644
@@ -1056,6 +1056,9 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
 	} else if (strcmp(type, "memory") != 0)
 		return 0;
 
+	if (!of_flat_dt_is_available(node))
+		return 0;
+
 	reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l);
 	if (reg == NULL)
 		reg = of_get_flat_dt_prop(node, "reg", &l);
Signature · 7 lines
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#4 lore raw

PATCH v3 3/5 powerpc/mm: allow memory hotplug into a memoryless node

In reply to Reza Arbab

Remove the check which prevents us from hotplugging into an empty node.

This limitation has been questioned before [1], and judging by the response, there doesn't seem to be a reason we can't remove it. No issues have been found in light testing.

[1] http://lkml.kernel.org/r/CAGZKiBrmkSa1yyhbf5hwGxubcjsE5SmkSMY4tpANERMe2UG4bg@mail.gmail.com

    http://lkml.kernel.org/r/[email protected]
---
 arch/powerpc/mm/numa.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
arch/powerpc/mm/numa.c +1 -12
index 75b9cd6..d7ac419 100644
@@ -1121,7 +1121,7 @@ static int hot_add_node_scn_to_nid(unsigned long scn_addr)
 int hot_add_scn_to_nid(unsigned long scn_addr)
 {
 	struct device_node *memory = NULL;
-	int nid, found = 0;
+	int nid;
 
 	if (!numa_enabled || (min_common_depth < 0))
 		return first_online_node;
@@ -1137,17 +1137,6 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
 	if (nid < 0 || !node_online(nid))
 		nid = first_online_node;
 
-	if (NODE_DATA(nid)->node_spanned_pages)
-		return nid;
-
-	for_each_online_node(nid) {
-		if (NODE_DATA(nid)->node_spanned_pages) {
-			found = 1;
-			break;
-		}
-	}
-
-	BUG_ON(!found);
 	return nid;
 }
 
Signature · 7 lines
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#5 lore raw

PATCH v3 4/5 powerpc/mm: restore top-down allocation when using movable_node

In reply to Reza Arbab

At boot, the movable_node option sets bottom-up memblock allocation.

This reduces the chance that, in the window before movable memory has been identified, an allocation for the kernel might come from a movable node. By going bottom-up, early allocations will most likely come from the same node as the kernel image, which is necessarily in a nonmovable node.

Then, once any known hotplug memory has been marked, allocation can be reset back to top-down. On x86, this is done in numa_init(). This patch does the same on power, in numa initmem_init().

---
 arch/powerpc/mm/numa.c | 3 +++
 1 file changed, 3 insertions(+)
arch/powerpc/mm/numa.c +3 -0
index d7ac419..fdf1e69 100644
@@ -945,6 +945,9 @@ void __init initmem_init(void)
 	max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
 	max_pfn = max_low_pfn;
 
+	/* bottom-up allocation may have been set by movable_node */
+	memblock_set_bottom_up(false);
+
 	if (parse_numa_properties())
 		setup_nonnuma();
 	else
Signature · 7 lines
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#6 lore raw

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

Quoted 22 lines · Reza Arbab

At boot, the movable_node option sets bottom-up memblock allocation.

This reduces the chance that, in the window before movable memory has been identified, an allocation for the kernel might come from a movable node. By going bottom-up, early allocations will most likely come from the same node as the kernel image, which is necessarily in a nonmovable node.

Then, once any known hotplug memory has been marked, allocation can be reset back to top-down. On x86, this is done in numa_init(). This patch does the same on power, in numa initmem_init().

---
 arch/powerpc/mm/numa.c | 3 +++
 1 file changed, 3 insertions(+)
arch/powerpc/mm/numa.c +0 -0
index d7ac419..fdf1e69 100644

arch/powerpc/mm/numa.c void __init initmem_init(void) · line 950

Quoted 6 lines
arch/powerpc/mm/numa.c +3 -0
@@ -945,6 +945,9 @@ void __init initmem_init(void)
 	max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
 	max_pfn = max_low_pfn;
 
+	/* bottom-up allocation may have been set by movable_node */
+	memblock_set_bottom_up(false);
+

By then we have done few memblock allocation right ? IMHO, we should do this early enough in prom.c after we do parse_early_param, with a comment there explaining that, we don't really support hotplug memblock and when we do that, this should be moved to a place where we can handle memblock allocation such that we avoid spreading memblock allocation to movable node.

Quoted 5 lines
arch/powerpc/mm/numa.c +0 -0
 	if (parse_numa_properties())
 		setup_nonnuma();
 	else
Signature · 1 line
1.8.3.1

-aneesh

author
#7 lore raw

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

Quoted 5 lines · Aneesh Kumar K.V

arch/powerpc/mm/numa.c void __init initmem_init(void) · line 950

Quoted 3 lines
arch/powerpc/mm/numa.c +3 -0
+	/* bottom-up allocation may have been set by movable_node */
+	memblock_set_bottom_up(false);
+

By then we have done few memblock allocation right ?

Yes, some allocations do occur while bottom-up is set.

Quoted 1 line

IMHO, we should do this early enough in prom.c after we do parse_early_param, with a comment there explaining that, we don't really support hotplug memblock and when we do that, this should be moved to a place where we can handle memblock allocation such that we avoid spreading memblock allocation to movable node.

Sure, we can do it earlier. The only consideration is that any potential calls to memblock_mark_hotplug() happen before we reset to top-down. Since we don't do that at all on power, the call can go anywhere.

Signature · 1 line
Reza Arbab
#8 lore raw

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

In reply to Reza Arbab
Quoted 11 lines · Reza Arbab

At boot, the movable_node option sets bottom-up memblock allocation.

This reduces the chance that, in the window before movable memory has been identified, an allocation for the kernel might come from a movable node. By going bottom-up, early allocations will most likely come from the same node as the kernel image, which is necessarily in a nonmovable node.

Then, once any known hotplug memory has been marked, allocation can be reset back to top-down. On x86, this is done in numa_init(). This patch does the same on power, in numa initmem_init().

That's fragile and a bit gross.

But then I'm not *that* fan of making accelerator memory be "memory" nodes in the first place. Oh well...

In any case, if the memory hasn't been hotplug, this shouldn't be necessary as we shouldn't be considering it for allocation.

If we want to prevent it for other reason, we should add logic for that in memblock, or reserve it early or something like that.

Just relying magically on the direction of the allocator is bad, really bad.

Ben.

Quoted 13 lines

---
 arch/powerpc/mm/numa.c | 3 +++

 1 file changed, 3 insertions(+)
arch/powerpc/mm/numa.c +0 -0
index d7ac419..fdf1e69 100644
@@ -945,6 +945,9 @@ void __init initmem_init(void)
 >  	max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
 >  	max_pfn = max_low_pfn;

Quoted 6 lines

arch/powerpc/mm/numa.c void __init initmem_init(void) · line 949

Quoted 2 lines
arch/powerpc/mm/numa.c +2 -0
+	/* bottom-up allocation may have been set by movable_node */
+	memblock_set_bottom_up(false);

+

Quoted 3 lines

  if (parse_numa_properties())
  setup_nonnuma();
  else

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#9 lore raw

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

Quoted 1 line · Benjamin Herrenschmidt

In any case, if the memory hasn't been hotplug, this shouldn't be necessary as we shouldn't be considering it for allocation.

Right. To be clear, the background info I put in the commit log refers to x86, where the SRAT can describe movable nodes which exist at boot. They're trying to avoid allocations from those nodes before they've been identified.

On power, movable nodes can only exist via hotplug, so that scenario can't happen. We can immediately go back to top-down allocation. That is the missing call being added in the patch.

Signature · 7 lines
Reza Arbab

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#10 lore raw

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

Quoted 7 lines · Reza Arbab
Quoted 1 line · Benjamin Herrenschmidt

In any case, if the memory hasn't been hotplug, this shouldn't be necessary as we shouldn't be considering it for allocation.

Right. To be clear, the background info I put in the commit log refers to x86, where the SRAT can describe movable nodes which exist at boot. They're trying to avoid allocations from those nodes before they've been identified.

On power, movable nodes can only exist via hotplug, so that scenario can't happen. We can immediately go back to top-down allocation. That is the missing call being added in the patch.

Can we fix cmdline_parse_movable_node() to do the right thing? I suspect that code is heavily x86 only in the sense that no other arch needs it.

Balbir Singh.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#11 lore raw

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

Quoted 6 lines · Balbir Singh
Quoted 3 lines · Reza Arbab

Right. To be clear, the background info I put in the commit log refers to x86, where the SRAT can describe movable nodes which exist at boot. They're trying to avoid allocations from those nodes before they've been identified.

On power, movable nodes can only exist via hotplug, so that scenario can't happen. We can immediately go back to top-down allocation. That is the missing call being added in the patch.

Can we fix cmdline_parse_movable_node() to do the right thing? I suspect that code is heavily x86 only in the sense that no other arch needs it.

Good idea. We could change it so things only go bottom-up on x86 in the first place.

A nice consequence is that CONFIG_MOVABLE_NODE would then basically be usable on any platform with memory hotplug, not just PPC64 and X86_64.

I'll see if I can move the relevant code into an arch_*() call or otherwise factor it out.

Signature · 1 line
Reza Arbab
author
#12 lore raw

PATCH v3 5/5 mm: enable CONFIG_MOVABLE_NODE on powerpc

In reply to Reza Arbab

To create a movable node, we need to hotplug all of its memory into ZONE_MOVABLE.

Note that to do this, auto_online_blocks should be off. Since the memory will first be added to the default zone, we must explicitly use online_movable to online.

Because such a node contains no normal memory, can_online_high_movable() will only allow us to do the onlining if CONFIG_MOVABLE_NODE is set. Enable the use of this config option on PPC64 platforms.

---
 Documentation/kernel-parameters.txt | 2 +-
 mm/Kconfig                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/kernel-parameters.txt +1 -1
index a4f4d69..3d8460d 100644
@@ -2344,7 +2344,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			that the amount of memory usable for all allocations
 			is not too small.
 
-	movable_node	[KNL,X86] Boot-time switch to enable the effects
+	movable_node	[KNL,X86,PPC] Boot-time switch to enable the effects
 			of CONFIG_MOVABLE_NODE=y. See mm/Kconfig for details.
 
 	MTD_Partition=	[MTD]
mm/Kconfig +1 -1
index be0ee11..4b19cd3 100644
@@ -153,7 +153,7 @@ config MOVABLE_NODE
 	bool "Enable to assign a node which has only movable memory"
 	depends on HAVE_MEMBLOCK
 	depends on NO_BOOTMEM
-	depends on X86_64
+	depends on X86_64 || PPC64
 	depends on NUMA
 	default n
 	help
Signature · 7 lines
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v3 5/5
#13 lore raw

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

Quoted 11 lines · Reza Arbab

To create a movable node, we need to hotplug all of its memory into ZONE_MOVABLE.

Note that to do this, auto_online_blocks should be off. Since the memory will first be added to the default zone, we must explicitly use online_movable to online.

Because such a node contains no normal memory, can_online_high_movable() will only allow us to do the onlining if CONFIG_MOVABLE_NODE is set. Enable the use of this config option on PPC64 platforms.

Quoted 34 lines
---
 Documentation/kernel-parameters.txt | 2 +-
 mm/Kconfig                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/kernel-parameters.txt +1 -1
index a4f4d69..3d8460d 100644
@@ -2344,7 +2344,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			that the amount of memory usable for all allocations
 			is not too small.
 
-	movable_node	[KNL,X86] Boot-time switch to enable the effects
+	movable_node	[KNL,X86,PPC] Boot-time switch to enable the effects
 			of CONFIG_MOVABLE_NODE=y. See mm/Kconfig for details.
 
 	MTD_Partition=	[MTD]
mm/Kconfig +1 -1
index be0ee11..4b19cd3 100644
@@ -153,7 +153,7 @@ config MOVABLE_NODE
 	bool "Enable to assign a node which has only movable memory"
 	depends on HAVE_MEMBLOCK
 	depends on NO_BOOTMEM
-	depends on X86_64
+	depends on X86_64 || PPC64
 	depends on NUMA
 	default n
 	help
Signature · 1 line
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

In reply to Reza Arbab
Quoted 10 lines · Reza Arbab

To create a movable node, we need to hotplug all of its memory into ZONE_MOVABLE.

Note that to do this, auto_online_blocks should be off. Since the memory will first be added to the default zone, we must explicitly use online_movable to online.

Because such a node contains no normal memory, can_online_high_movable() will only allow us to do the onlining if CONFIG_MOVABLE_NODE is set. Enable the use of this config option on PPC64 platforms.

What is that business with a command line argument ? Do that mean that we'll need some magic command line argument to properly handle LPC memory on CAPI devices or GPUs ? If yes that's bad ... kernel arguments should be a last resort.

We should have all the information we need from the device-tree.

Note also that we shouldn't need to create those nodes at boot time, we need to add the ability to create the whole thing at runtime, we may know that there's an NPU with an LPC window in the system but we won't know if it's used until it is and for CAPI we just simply don't know until some PCI device gets turned into CAPI mode and starts claiming LPC memory...

Ben.

Quoted 24 lines

---
 Documentation/kernel-parameters.txt | 2 +-
 mm/Kconfig                          | 2 +-

 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/kernel-parameters.txt +0 -0
index a4f4d69..3d8460d 100644
@@ -2344,7 +2344,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Quoted 2 lines

  that the amount of memory usable for all allocations is not too small.

Quoted 3 lines

Documentation/kernel-parameters.txt bytes respectively. Such letter suffixes can also be entirely omitted. · line 2347

Quoted 2 lines
Documentation/kernel-parameters.txt +1 -1
-	movable_node	[KNL,X86] Boot-time switch to enable the effects
+	movable_node	[KNL,X86,PPC] Boot-time switch to enable the effects

  of CONFIG_MOVABLE_NODE=y. See mm/Kconfig for details.

Quoted 1 line
Quoted 1 line

  MTD_Partition= [MTD]

mm/Kconfig +0 -0
index be0ee11..4b19cd3 100644
@@ -153,7 +153,7 @@ config MOVABLE_NODE
Quoted 8 lines
Quoted 8 lines

  bool "Enable to assign a node which has only movable memory" depends on HAVE_MEMBLOCK
  depends on NO_BOOTMEM

mm/Kconfig +1 -1
-	depends on X86_64
+	depends on X86_64 || PPC64

  depends on NUMA
  default n
  help

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#15 lore raw

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

Quoted 4 lines · Benjamin Herrenschmidt

What is that business with a command line argument ? Do that mean that we'll need some magic command line argument to properly handle LPC memory on CAPI devices or GPUs ? If yes that's bad ... kernel arguments should be a last resort.

Well, movable_node is just a boolean, meaning "allow nodes which contain only movable memory". It's _not_ like "movable_node=10,13-15,17", if that's what you were thinking.

Quoted 7 lines

We should have all the information we need from the device-tree.

Note also that we shouldn't need to create those nodes at boot time, we need to add the ability to create the whole thing at runtime, we may know that there's an NPU with an LPC window in the system but we won't know if it's used until it is and for CAPI we just simply don't know until some PCI device gets turned into CAPI mode and starts claiming LPC memory...

Yes, this is what is planned for, if I'm understanding you correctly.

In the dt, the PCI device node has a phandle pointing to the memory node. The memory node describes the window into which we can hotplug at runtime.

Signature · 7 lines
Reza Arbab

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>