public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: rric@kernel.org (Robert Richter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64, numa: Add cpu_to_node() implementation.
Date: Tue, 20 Sep 2016 15:38:13 +0200	[thread overview]
Message-ID: <20160920133813.GR25086@rric.localdomain> (raw)
In-Reply-To: <57E11E52.8060303@linaro.org>

On 20.09.16 19:32:34, Hanjun Guo wrote:
> On 09/20/2016 06:43 PM, Robert Richter wrote:

> >Instead we need to make sure the set_*numa_node() functions are called
> >earlier before secondary cpus are booted. My suggested change for that
> >is this:
> >
> >
> >diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> >index d93d43352504..952365c2f100 100644
> >--- a/arch/arm64/kernel/smp.c
> >+++ b/arch/arm64/kernel/smp.c
> >@@ -204,7 +204,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
> >  static void smp_store_cpu_info(unsigned int cpuid)
> >  {
> >  	store_cpu_topology(cpuid);
> >-	numa_store_cpu_info(cpuid);
> >  }
> >
> >  /*
> >@@ -719,6 +718,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
> >  			continue;
> >
> >  		set_cpu_present(cpu, true);
> >+		numa_store_cpu_info(cpu);
> >  	}
> >  }
> 
> We tried a similar approach which add numa_store_cpu_info() in
> early_map_cpu_to_node(), and remove it from smp_store_cpu_info,
> but didn't work for us, we will try your approach to see if works.

Calling it in early_map_cpu_to_node() is probably too early since
setup_node_to_cpumask_map() is called in numa_init() afterwards
overwriting it again.

Actually, early_map_cpu_to_node() is used to temporarily store the
mapping until it can be setup in numa_store_cpu_info().

-Robert

  parent reply	other threads:[~2016-09-20 13:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 18:49 [PATCH] arm64, numa: Add cpu_to_node() implementation David Daney
2016-09-20  4:45 ` Ganapatrao Kulkarni
2016-09-20  9:56 ` Yisheng Xie
2016-09-20 10:05 ` Hanjun Guo
2016-09-20 10:43 ` Robert Richter
2016-09-20 11:09   ` Mark Rutland
2016-09-20 11:32   ` Hanjun Guo
2016-09-20 13:21     ` Robert Richter
2016-09-27  6:26       ` Hanjun Guo
2016-10-06  9:15         ` Robert Richter
2016-09-20 13:38     ` Robert Richter [this message]
2016-09-20 14:12       ` Hanjun Guo
2016-09-21 16:42         ` Jon Masters
2016-09-20 17:53   ` David Daney

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=20160920133813.GR25086@rric.localdomain \
    --to=rric@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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