linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: "Shuah Khan (Samsung OSG)" <shuah@kernel.org>
Cc: catalin.marinas@arm.com, sudeep.holla@arm.com,
	ganapatrao.kulkarni@cavium.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: add NUMA emulation support
Date: Tue, 28 Aug 2018 18:40:12 +0100	[thread overview]
Message-ID: <20180828174011.GE20375@arm.com> (raw)
In-Reply-To: <20180824230559.32336-1-shuah@kernel.org>

On Fri, Aug 24, 2018 at 05:05:59PM -0600, Shuah Khan (Samsung OSG) wrote:
> Add NUMA emulation support to emulate NUMA on non-NUMA platforms. A new
> CONFIG_NUMA_EMU option enables NUMA emulation and a new kernel command
> line option "numa=fake=N" allows users to specify the configuration for
> emulation.
> 
> When NUMA emulation is enabled, a flat (non-NUMA) machine will be split
> into virtual NUMA nodes when booted with "numa=fake=N", where N is the
> number of nodes, the system RAM will be split into N equal chunks and
> assigned to each node.
> 
> Emulated nodes are bounded by MAX_NUMNODES and the number of memory block
> count to avoid splitting memory blocks across NUMA nodes.
> 
> If NUMA emulation init fails, it will fall back to dummy NUMA init.
> 
> This is tested on Raspberry Pi3b+ with ltp NUMA test suite, numactl, and
> numastat tools. In addition, tested in conjunction with cpuset cgroup to
> verify cpuset.cpus and cpuset.mems assignments.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
> ---
>  arch/arm64/Kconfig            |   9 +++
>  arch/arm64/include/asm/numa.h |   8 +++
>  arch/arm64/mm/Makefile        |   1 +
>  arch/arm64/mm/numa.c          |   4 ++
>  arch/arm64/mm/numa_emu.c      | 109 ++++++++++++++++++++++++++++++++++
>  5 files changed, 131 insertions(+)
>  create mode 100644 arch/arm64/mm/numa_emu.c

Hmm, is this just for debugging and kernel development? If so, it's quite a
lot of code just for that. Can't you achieve the same thing by faking up the
firmware tables?

Will

  reply	other threads:[~2018-08-28 17:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 23:05 [PATCH] arm64: add NUMA emulation support Shuah Khan (Samsung OSG)
2018-08-28 17:40 ` Will Deacon [this message]
2018-08-28 18:09   ` Shuah Khan
2018-08-29 11:08     ` Michal Hocko
2018-09-04 21:59       ` Shuah Khan
2018-09-05  6:42         ` Michal Hocko
2018-09-06 21:53           ` Shuah Khan
2018-09-07  8:34             ` Michal Hocko
2018-09-07 22:30               ` Shuah Khan
2018-09-10 13:48                 ` Michal Hocko
2018-09-11  2:02                   ` Shuah Khan
2018-09-11  9:11                     ` Michal Hocko
2018-09-11 15:27                       ` Shuah Khan
2018-09-11 16:50                         ` Will Deacon
2018-09-11 19:53                           ` Shuah Khan

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=20180828174011.GE20375@arm.com \
    --to=will.deacon@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=ganapatrao.kulkarni@cavium.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).