Re: [PATCH V9 2/2] powerpc/nodes: Ensure enough nodes avail for operations

From: Michael Ellerman
Date: Wed Aug 23 2017 - 07:20:57 EST


Michael Bringmann <mwb@xxxxxxxxxxxxxxxxxx> writes:

> To: linuxppc-dev@xxxxxxxxxxxxxxxx
>
> From: Michael Bringmann <mwb@xxxxxxxxxxxxxxxxxx>
>
> To: linux-kernel@xxxxxxxxxxxxxxx
> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Cc: Michael Bringmann <mwb@xxxxxxxxxxxxxxxxxx>
> Cc: John Allen <jallen@xxxxxxxxxxxxxxxxxx>
> Cc: Nathan Fontenot <nfont@xxxxxxxxxxxxxxxxxx>
> Subject: [PATCH V9 2/2] powerpc/nodes: Ensure enough nodes avail for operations
>
> powerpc/nodes: On systems like PowerPC which allow 'hot-add' of CPU
> or memory resources, it may occur that the new resources are to be
> inserted into nodes that were not used for these resources at bootup.
> In the kernel, any node that is used must be defined and initialized
> at boot.
>
> This patch extracts the value of the lowest domain level (number of
> allocable resources) from the "rtas" device tree property
> "ibm,max-associativity-domains" to use as the maximum number of nodes
> to setup as possibly available in the system. This new setting will
> override the instruction,

Thanks for implementing my suggestion of using "ibm,max-associativity-domains".

However I don't think it's correct to use the lowest domain level.

It's not very clearly specified in PAPR, but I think you need to treat
it like an associativity property and index into based on the
associativity reference points.

You should be able to use min_common_depth as the index.

cheers