powerpc/pseries: new lparcfg key/value pair: partition_affinity_score
authorScott Cheloha <cheloha@linux.ibm.com>
Mon, 27 Jul 2020 18:46:05 +0000 (13:46 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Sep 2020 01:00:20 +0000 (11:00 +1000)
commit5d1bc776428f34941a6237afb9454061b5b5e1e1
treec664aff906f7bb7161d9d8a628334f910b1406c5
parent59562b5c33d6ff3685509ed58b2ed3c5b5712704
powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

The H_GetPerformanceCounterInfo (GPCI) PHYP hypercall has a subcall,
Affinity_Domain_Info_By_Partition, which returns, among other things,
a "partition affinity score" for a given LPAR.  This score, a value on
[0-100], represents the processor-memory affinity for the LPAR in
question.  A score of 0 indicates the worst possible affinity while a
score of 100 indicates perfect affinity.  The score can be used to
reason about performance.

This patch adds the score for the local LPAR to the lparcfg procfile
under a new 'partition_affinity_score' key.

Signed-off-by: Scott Cheloha <cheloha@linux.ibm.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Acked-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200727184605.2945095-2-cheloha@linux.ibm.com
arch/powerpc/platforms/pseries/lparcfg.c