Re: [PATCH] powerpc/numa: Fix percpu allocations to be NUMA aware

2017-06-07 Thread Michael Ellerman
Balbir Singh writes: > On Fri, Jun 2, 2017 at 3:14 PM, Michael Ellerman wrote: >> diff --git a/arch/powerpc/include/asm/topology.h >> b/arch/powerpc/include/asm/topology.h >> index 8b3b46b7b0f2..8f3b2ec09b9e 100644 >> ---

Re: [PATCH] powerpc/numa: Fix percpu allocations to be NUMA aware

2017-06-06 Thread Balbir Singh
On Fri, Jun 2, 2017 at 3:14 PM, Michael Ellerman wrote: > In commit 8c272261194d ("powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID"), we > switched to the generic implementation of cpu_to_node(), which uses a percpu > variable to hold the NUMA node for each CPU. > >

Re: [PATCH] powerpc/numa: Fix percpu allocations to be NUMA aware

2017-06-06 Thread Michael Ellerman
Nicholas Piggin writes: > On Fri, 02 Jun 2017 19:54:32 +1000 > Michael Ellerman wrote: > >> >> @@ -672,10 +672,19 @@ static void __init pcpu_fc_free(void *ptr, size_t >> >> size) >> >> >> >> static int pcpu_cpu_distance(unsigned int from, unsigned int

Re: [PATCH] powerpc/numa: Fix percpu allocations to be NUMA aware

2017-06-02 Thread Nicholas Piggin
On Fri, 02 Jun 2017 19:54:32 +1000 Michael Ellerman wrote: > >> @@ -672,10 +672,19 @@ static void __init pcpu_fc_free(void *ptr, size_t > >> size) > >> > >> static int pcpu_cpu_distance(unsigned int from, unsigned int to) > >> { > >> - if (cpu_to_node(from) ==

Re: [PATCH] powerpc/numa: Fix percpu allocations to be NUMA aware

2017-06-02 Thread Michael Ellerman
Nicholas Piggin writes: > On Fri, 2 Jun 2017 15:14:47 +1000 > Michael Ellerman wrote: > >> In commit 8c272261194d ("powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID"), we >> switched to the generic implementation of cpu_to_node(), which uses a percpu >>

Re: [PATCH] powerpc/numa: Fix percpu allocations to be NUMA aware

2017-06-01 Thread Nicholas Piggin
On Fri, 2 Jun 2017 15:14:47 +1000 Michael Ellerman wrote: > In commit 8c272261194d ("powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID"), we > switched to the generic implementation of cpu_to_node(), which uses a percpu > variable to hold the NUMA node for each CPU. > >

[PATCH] powerpc/numa: Fix percpu allocations to be NUMA aware

2017-06-01 Thread Michael Ellerman
In commit 8c272261194d ("powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID"), we switched to the generic implementation of cpu_to_node(), which uses a percpu variable to hold the NUMA node for each CPU. Unfortunately we neglected to notice that we use cpu_to_node() in the allocation of our percpu