Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-10-06 Thread Robert Richter
On 27.09.16 14:26:08, Hanjun Guo wrote: > On 09/20/2016 09:21 PM, Robert Richter wrote: > >On 20.09.16 19:32:34, Hanjun Guo wrote: > >>On 09/20/2016 06:43 PM, Robert Richter wrote: > > > >>>Unfortunately either your nor my code does fix the BUG_ON() I see with > >>>the numa kernel: > >>> > >>> ker

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-26 Thread Hanjun Guo
On 09/20/2016 09:21 PM, Robert Richter wrote: On 20.09.16 19:32:34, Hanjun Guo wrote: On 09/20/2016 06:43 PM, Robert Richter wrote: Unfortunately either your nor my code does fix the BUG_ON() I see with the numa kernel: kernel BUG at mm/page_alloc.c:1848! See below for the core dump. It l

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-21 Thread Jon Masters
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 ar

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread David Daney
On 09/20/2016 03:43 AM, 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..952365c2

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Hanjun Guo
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 --g

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Robert Richter
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/

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Robert Richter
On 20.09.16 19:32:34, Hanjun Guo wrote: > On 09/20/2016 06:43 PM, Robert Richter wrote: > >Unfortunately either your nor my code does fix the BUG_ON() I see with > >the numa kernel: > > > > kernel BUG at mm/page_alloc.c:1848! > > > >See below for the core dump. It looks like this happens due to m

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Hanjun Guo
+Cc Yisheng, On 09/20/2016 06:43 PM, Robert Richter wrote: David, On 19.09.16 11:49:30, David Daney wrote: Fix by supplying a cpu_to_node() implementation that returns correct node mappings. +int cpu_to_node(int cpu) +{ + int nid; + + /* +* Return 0 for unknown mapping s

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Mark Rutland
On Tue, Sep 20, 2016 at 12:43:48PM +0200, Robert Richter wrote: > Unfortunately either your nor my code does fix the BUG_ON() I see with > the numa kernel: > > kernel BUG at mm/page_alloc.c:1848! > > See below for the core dump. It looks like this happens due to moving > a mem block where first

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Robert Richter
David, On 19.09.16 11:49:30, David Daney wrote: > Fix by supplying a cpu_to_node() implementation that returns correct > node mappings. > +int cpu_to_node(int cpu) > +{ > + int nid; > + > + /* > + * Return 0 for unknown mapping so that we report something > + * sensible if firmw

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Hanjun Guo
On 09/20/2016 02:49 AM, David Daney wrote: From: David Daney The wq_numa_init() function makes a private CPU to node map by calling cpu_to_node() early in the boot process, before the non-boot CPUs are brought online. Since the default implementation of cpu_to_node() returns zero for CPUs that

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Yisheng Xie
On 2016/9/20 2:49, David Daney wrote: > From: David Daney > > The wq_numa_init() function makes a private CPU to node map by calling > cpu_to_node() early in the boot process, before the non-boot CPUs are > brought online. Since the default implementation of cpu_to_node() > returns zero for CP

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-19 Thread Ganapatrao Kulkarni
[sending again, previous email was not text] On Tue, Sep 20, 2016 at 12:19 AM, David Daney wrote: > From: David Daney > > The wq_numa_init() function makes a private CPU to node map by calling > cpu_to_node() early in the boot process, before the non-boot CPUs are > brought online. Since the de