Re: [PATCH V12] powerpc/vphn: Update CPU topology when VPHN enabled

From: Michael Ellerman
Date: Fri Sep 01 2017 - 06:10:44 EST


Hi Michael,

Thanks for trying to reduce this down to the minimum required.

But ...

Michael Bringmann <mwb@xxxxxxxxxxxxxxxxxx> writes:
> powerpc/numa: On Power systems with shared configurations of CPUs
> and memory, there are some issues with the association of additional
> CPUs and memory to nodes when hot-adding resources. This patch
> addresses some of those problems.
>
> First, it corrects the currently broken capability to set the
> topology for shared CPUs in LPARs. At boot time for shared CPU
> lpars, the topology for each CPU was being set to node zero. Now
> when numa_update_cpu_topology() is called appropriately, the Virtual
> Processor Home Node (VPHN) capabilities information provided by the
> pHyp allows the appropriate node in the shared configuration to be
> selected for the CPU.

That should be one patch.

> Next, it updates the initialization checks to independently recognize
> PRRN or VPHN support.

And another.

> Next, during hotplug CPU operations, it resets the timer on topology
> update work function to a small value to better ensure that the CPU
> topology is detected and configured sooner.

Another.

> Also, fix an end-of-updates processing problem observed occasionally
> in numa_update_cpu_topology().

And another.


I would have let you get away with lumping it all in together, except
that it doesn't compile when CONFIG_PPC_SPLPAR=n:

In file included from ../include/linux/topology.h:35:0,
from ../include/linux/gfp.h:8,
from ../include/linux/irq.h:17,
from ../arch/powerpc/include/asm/hardirq.h:5,
from ../include/linux/hardirq.h:8,
from ../include/linux/interrupt.h:12,
from ../arch/powerpc/platforms/pseries/hotplug-cpu.c:24:
../arch/powerpc/platforms/pseries/hotplug-cpu.c: In function âdlpar_online_cpuâ:
../arch/powerpc/include/asm/topology.h:103:38: error: statement with no effect [-Werror=unused-value]
#define timed_topology_update(nsecs) 0
^
../arch/powerpc/platforms/pseries/hotplug-cpu.c:366:4: note: in expansion of macro âtimed_topology_updateâ
timed_topology_update(1);
^~~~~~~~~~~~~~~~~~~~~
../arch/powerpc/platforms/pseries/hotplug-cpu.c: In function âdlpar_offline_cpuâ:
../arch/powerpc/include/asm/topology.h:103:38: error: statement with no effect [-Werror=unused-value]
#define timed_topology_update(nsecs) 0
^
../arch/powerpc/platforms/pseries/hotplug-cpu.c:533:5: note: in expansion of macro âtimed_topology_updateâ
timed_topology_update(1);
^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


So please fix that up, split it, and resend.

I know it would have been fairly easy for me to fix that compiler error,
but it tells me you haven't tested that configuration at all, which is
the bigger problem. Please at least give it a smoke test.

cheers