linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: mingo@redhat.com, dan.j.williams@intel.com
Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] x86/numa_emulation: fix parsing of numa_meminfo for uniform numa emulation
Date: Wed, 19 Sep 2018 10:19:31 -0700	[thread overview]
Message-ID: <153737757130.23982.8187099986085191337.stgit@djiang5-desk3.ch.intel.com> (raw)

During fakenuma processing in numa_emulation(), pi gets passed in and
processed as new fake numa nodes are being split out. Once the original
memory region is proccessed, it gets removed from the pi by
numa_remove_memblk_from() in emu_setup_memblk(). So entry 0 gets deleted
and the rest of the entries get moved up. Therefore we should always pass
in entry 0 for the next entry to process.

Fixes: 1f6a2c6d9f121 ("x86/numa_emulation: Introduce uniform split
capability")

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 arch/x86/mm/numa_emulation.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c
index b54d52a2d00a..a3ca8bf5afcb 100644
--- a/arch/x86/mm/numa_emulation.c
+++ b/arch/x86/mm/numa_emulation.c
@@ -401,8 +401,8 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
 		ret = -1;
 		for_each_node_mask(i, physnode_mask) {
 			ret = split_nodes_size_interleave_uniform(&ei, &pi,
-					pi.blk[i].start, pi.blk[i].end, 0,
-					n, &pi.blk[i], nid);
+					pi.blk[0].start, pi.blk[0].end, 0,
+					n, &pi.blk[0], nid);
 			if (ret < 0)
 				break;
 			if (ret < n) {


             reply	other threads:[~2018-09-19 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 17:19 Dave Jiang [this message]
2018-09-19 17:28 ` [PATCH] x86/numa_emulation: fix parsing of numa_meminfo for uniform numa emulation Dan Williams

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=153737757130.23982.8187099986085191337.stgit@djiang5-desk3.ch.intel.com \
    --to=dave.jiang@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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).