linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Bruno Faccini <bfaccini@nvidia.com>, linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, rppt@kernel.org,
	ziy@nvidia.com, jhubbard@nvidia.com, mrusiniak@nvidia.com,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/1] mm/fake-numa: allow later numa node hotplug
Date: Tue, 14 Jan 2025 17:05:41 +0100	[thread overview]
Message-ID: <7493daa0-b15c-43e8-9235-78a0a1a8c8a6@redhat.com> (raw)
In-Reply-To: <20250106120659.359610-2-bfaccini@nvidia.com>

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@nvidia.com>
> ---
>   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



  reply	other threads:[~2025-01-14 16:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 12:06 [PATCH 0/1] " Bruno Faccini
2025-01-06 12:06 ` [PATCH 1/1] " Bruno Faccini
2025-01-14 16:05   ` David Hildenbrand [this message]
2025-01-17  5:00   ` [fake numa not working][PATCH " Hyeonggon Yoo
2025-01-17 19:09     ` [fake numa not working] [PATCH " Zi Yan
2025-01-20  0:37       ` Hyeonggon Yoo
2025-01-20  2:16         ` Zi Yan
2025-01-20  2:37           ` Hyeonggon Yoo
2025-01-20  3:27             ` Zi Yan
2025-01-20  4:35               ` Hyeonggon Yoo
2025-01-20  8:11               ` Bruno Faccini
2025-01-27 17:38                 ` Bruno Faccini
2025-01-07 10:08 ` [PATCH 0/1] " David Hildenbrand
2025-01-10 14:59   ` Bruno Faccini
2025-01-14 14:15     ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7493daa0-b15c-43e8-9235-78a0a1a8c8a6@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bfaccini@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mrusiniak@nvidia.com \
    --cc=rafael@kernel.org \
    --cc=rppt@kernel.org \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox