All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Masters <jcm@redhat.com>
To: Hanjun Guo <hanjun.guo@linaro.org>, Robert Richter <rric@kernel.org>
Cc: David Daney <ddaney.cavm@gmail.com>,
	linux-kernel@vger.kernel.org, Marc Zyngier <marc.zyngier@arm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Will Deacon <will.deacon@arm.com>,
	Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>,
	linux-arm-kernel@lists.infradead.org,
	David Daney <david.daney@cavium.com>,
	xieyisheng1@huawei.com
Subject: Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.
Date: Wed, 21 Sep 2016 12:42:04 -0400	[thread overview]
Message-ID: <9f9097ec-6097-4ef7-a710-e7ad89470814@redhat.com> (raw)
In-Reply-To: <57E143DA.5030602@linaro.org>

On 09/20/2016 10:12 AM, Hanjun Guo wrote:
> On 09/20/2016 09:38 PM, Robert Richter wrote:
>> 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.
> 
> And it works :)

Great. I'm curious for further (immediate) feedback on David's updated
patch in the other thread due to some time sensitive needs on our end.

Jon.



-- 
Computer Architect | Sent from my Fedora powered laptop

WARNING: multiple messages have this Message-ID (diff)
From: jcm@redhat.com (Jon Masters)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64, numa: Add cpu_to_node() implementation.
Date: Wed, 21 Sep 2016 12:42:04 -0400	[thread overview]
Message-ID: <9f9097ec-6097-4ef7-a710-e7ad89470814@redhat.com> (raw)
In-Reply-To: <57E143DA.5030602@linaro.org>

On 09/20/2016 10:12 AM, Hanjun Guo wrote:
> On 09/20/2016 09:38 PM, Robert Richter wrote:
>> 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.
> 
> And it works :)

Great. I'm curious for further (immediate) feedback on David's updated
patch in the other thread due to some time sensitive needs on our end.

Jon.



-- 
Computer Architect | Sent from my Fedora powered laptop

  reply	other threads:[~2016-09-21 16:42 UTC|newest]

Thread overview: 28+ 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-19 18:49 ` David Daney
2016-09-20  4:45 ` Ganapatrao Kulkarni
2016-09-20  4:45   ` Ganapatrao Kulkarni
2016-09-20  9:56 ` Yisheng Xie
2016-09-20  9:56   ` Yisheng Xie
2016-09-20 10:05 ` Hanjun Guo
2016-09-20 10:05   ` Hanjun Guo
2016-09-20 10:43 ` Robert Richter
2016-09-20 10:43   ` Robert Richter
2016-09-20 11:09   ` Mark Rutland
2016-09-20 11:09     ` Mark Rutland
2016-09-20 11:32   ` Hanjun Guo
2016-09-20 11:32     ` Hanjun Guo
2016-09-20 13:21     ` Robert Richter
2016-09-20 13:21       ` Robert Richter
2016-09-27  6:26       ` Hanjun Guo
2016-09-27  6:26         ` Hanjun Guo
2016-10-06  9:15         ` Robert Richter
2016-10-06  9:15           ` Robert Richter
2016-09-20 13:38     ` Robert Richter
2016-09-20 13:38       ` Robert Richter
2016-09-20 14:12       ` Hanjun Guo
2016-09-20 14:12         ` Hanjun Guo
2016-09-21 16:42         ` Jon Masters [this message]
2016-09-21 16:42           ` Jon Masters
2016-09-20 17:53   ` David Daney
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=9f9097ec-6097-4ef7-a710-e7ad89470814@redhat.com \
    --to=jcm@redhat.com \
    --cc=david.daney@cavium.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=gkulkarni@caviumnetworks.com \
    --cc=hanjun.guo@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rric@kernel.org \
    --cc=will.deacon@arm.com \
    --cc=xieyisheng1@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.