Re: [PATCH v2 1/1] pseries/hotplug-cpu: Change default behaviour of cede_offline to "off"

From: Nathan Lynch
Date: Thu Oct 31 2019 - 12:30:30 EST


"Gautham R. Shenoy" <ego@xxxxxxxxxxxxxxxxxx> writes:
> From: "Gautham R. Shenoy" <ego@xxxxxxxxxxxxxxxxxx>
>
> Currently on PSeries Linux guests, the offlined CPU can be put to one
> of the following two states:
> - Long term processor cede (also called extended cede)
> - Returned to the hypervisor via RTAS "stop-self" call.
>
> This is controlled by the kernel boot parameter "cede_offline=on/off".
>
> By default the offlined CPUs enter extended cede. The PHYP hypervisor
> considers CPUs in extended cede to be "active" since they are still
> under the control fo the Linux guests. Hence, when we change the SMT
> modes by offlining the secondary CPUs, the PURR and the RWMR SPRs will
> continue to count the values for offlined CPUs in extended cede as if
> they are online. This breaks the accounting in tools such as lparstat.
>
> To fix this, ensure that by default the offlined CPUs are returned to
> the hypervisor via RTAS "stop-self" call by changing the default value
> of "cede_offline_enabled" to false.
>
> Fixes: commit 3aa565f53c39 ("powerpc/pseries: Add hooks to put the CPU
> into an appropriate offline state")
>
> Signed-off-by: Gautham R. Shenoy <ego@xxxxxxxxxxxxxxxxxx>

I'm OK with changing the default as a precursor to removing the code
that implements the cede offline mode.

Acked-by: Nathan Lynch <nathanl@xxxxxxxxxxxxx>