From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tvrtko Ursulin <tursulin@igalia.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-dev@igalia.com,
"Maíra Canal" <mcanal@igalia.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>
Subject: Re: [PATCH 1/2] numa: Add simple generic NUMA emulation
Date: Wed, 26 Jun 2024 09:39:10 +0200 [thread overview]
Message-ID: <2024062658-unmasked-degree-2f80@gregkh> (raw)
In-Reply-To: <20240625125803.38038-2-tursulin@igalia.com>
On Tue, Jun 25, 2024 at 01:58:02PM +0100, Tvrtko Ursulin wrote:
> From: Maíra Canal <mcanal@igalia.com>
>
> Add some common code for splitting the memory into N emulated NUMA memory
> nodes.
>
> Individual architecture can then enable selecting this option and use the
> existing numa=fake=<N> kernel argument to enable it.
>
> Memory is always split into equally sized chunks.
>
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> Co-developed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: “Rafael J. Wysocki" <rafael@kernel.org>
> ---
> drivers/base/Kconfig | 7 ++++
> drivers/base/Makefile | 1 +
> drivers/base/arch_numa.c | 6 ++++
> drivers/base/numa_emulation.c | 67 +++++++++++++++++++++++++++++++++++
> drivers/base/numa_emulation.h | 21 +++++++++++
> 5 files changed, 102 insertions(+)
> create mode 100644 drivers/base/numa_emulation.c
> create mode 100644 drivers/base/numa_emulation.h
>
> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> index 2b8fd6bb7da0..1f60cd4dd057 100644
> --- a/drivers/base/Kconfig
> +++ b/drivers/base/Kconfig
> @@ -230,6 +230,13 @@ config GENERIC_ARCH_NUMA
> Enable support for generic NUMA implementation. Currently, RISC-V
> and ARM64 use it.
>
> +config GENERIC_ARCH_NUMA_EMULATION
> + bool
> + depends on GENERIC_ARCH_NUMA
> + help
> + Enable NUMA emulation. Note that NUMA emulation will only be used if
> + the machine has no NUMA node.
> +
> config FW_DEVLINK_SYNC_STATE_TIMEOUT
> bool "sync_state() behavior defaults to timeout instead of strict"
> help
> diff --git a/drivers/base/Makefile b/drivers/base/Makefile
> index 3079bfe53d04..34fcf5bd7370 100644
> --- a/drivers/base/Makefile
> +++ b/drivers/base/Makefile
> @@ -25,6 +25,7 @@ obj-$(CONFIG_DEV_COREDUMP) += devcoredump.o
> obj-$(CONFIG_GENERIC_MSI_IRQ) += platform-msi.o
> obj-$(CONFIG_GENERIC_ARCH_TOPOLOGY) += arch_topology.o
> obj-$(CONFIG_GENERIC_ARCH_NUMA) += arch_numa.o
> +obj-$(CONFIG_GENERIC_ARCH_NUMA_EMULATION) += numa_emulation.o
> obj-$(CONFIG_ACPI) += physical_location.o
>
> obj-y += test/
> diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c
> index 5b59d133b6af..6ad08f681b3c 100644
> --- a/drivers/base/arch_numa.c
> +++ b/drivers/base/arch_numa.c
> @@ -15,6 +15,8 @@
>
> #include <asm/sections.h>
>
> +#include "numa_emulation.h"
> +
> struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
> EXPORT_SYMBOL(node_data);
> nodemask_t numa_nodes_parsed __initdata;
> @@ -30,6 +32,8 @@ static __init int numa_parse_early_param(char *opt)
> return -EINVAL;
> if (str_has_prefix(opt, "off"))
> numa_off = true;
> + if (str_has_prefix(opt, "fake="))
> + return numa_emu_cmdline(opt + 5);
You did not document this at all :(
next prev parent reply other threads:[~2024-06-26 7:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 12:58 [PATCH 0/2] NUMA emulation for arm64 Tvrtko Ursulin
2024-06-25 12:58 ` [PATCH 1/2] numa: Add simple generic NUMA emulation Tvrtko Ursulin
2024-06-26 7:38 ` Greg Kroah-Hartman
2024-06-26 11:47 ` Tvrtko Ursulin
2024-07-03 7:47 ` Tvrtko Ursulin
2024-08-08 11:56 ` Tvrtko Ursulin
2024-08-08 16:27 ` Jonathan Cameron
2024-08-12 16:35 ` Tvrtko Ursulin
2024-08-22 9:28 ` Mike Rapoport
2024-06-26 7:39 ` Greg Kroah-Hartman [this message]
2024-06-25 12:58 ` [PATCH 2/2] arm64/numa: Add NUMA emulation for ARM64 Tvrtko Ursulin
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=2024062658-unmasked-degree-2f80@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=catalin.marinas@arm.com \
--cc=kernel-dev@igalia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcanal@igalia.com \
--cc=tursulin@igalia.com \
--cc=tvrtko.ursulin@igalia.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).