Re: [PATCH 1/1] mm/fake-numa: allow later numa node hotplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06.01.25 13:06, Bruno Faccini wrote:
Current fake-numa implementation prevents new Numa
nodes to be later hot-plugged by drivers.
A common symptom of this limitation is the
"node <X> was absent from the node_possible_map"
message by associated warning in mm/memory_hotplug.c:
add_memory_resource().
This comes from the lack of remapping in both
pxm_to_node_map[] and node_to_pxm_map[] tables
to take fake-numa nodes into account and thus
triggers collisions with original and physical nodes
only-mapping that had been determined from BIOS tables.
This patch fixes this by doing the necessary node-ids
translation in both pxm_to_node_map[]/node_to_pxm_map[]
tables.
node_distance[] table has also been fixed accordingly.

You're allowed to use up to 72 chars per line, and adding some empty lines might make this easier to read.

Did you forget to CC ACPI folks + mailing list?


Signed-off-by: Bruno Faccini <bfaccini@xxxxxxxxxx>
---
  drivers/acpi/numa/srat.c     | 86 ++++++++++++++++++++++++++++++++++++
  include/acpi/acpi_numa.h     |  5 +++
  include/linux/numa_memblks.h |  3 ++
  mm/numa_emulation.c          | 45 ++++++++++++++++---
  mm/numa_memblks.c            |  2 +-
  5 files changed, 133 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
index bec0dcd1f9c3..59fffe34c9d0 100644
--- a/drivers/acpi/numa/srat.c
+++ b/drivers/acpi/numa/srat.c
@@ -81,6 +81,92 @@ int acpi_map_pxm_to_node(int pxm)
  }
  EXPORT_SYMBOL(acpi_map_pxm_to_node);
+#ifdef CONFIG_NUMA_EMU
+/*
+ * Take max_nid - 1 fake-numa nodes into account in both
+ * pxm_to_node_map()/node_to_pxm_map[] tables.
+ */

Having the fake-numa stuff in here looks quite hacky; but I'm no expert, so I'll let ACPI folks comment (on CC) on the details.


--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux