[OpenPower-Firmware] Limit the CPU frequency
Stewart Smith
stewart at linux.ibm.com
Mon Apr 23 18:33:03 AEST 2018
Artem Senichev <artemsen at gmail.com> writes:
> We have some hardware problem with 12-cores P8 CPU running at high
> load with maximum frequency.
> A workaround is to limit the frequency from the OS (for example, using
> `cpupower frequency-set`).
>
> Fixing this issue can take a lot of time, so I want to use the
> workaround as a temporary solution, but I want to set the upper limit
> in the firmware layer to prevent it from being changed by the OS
> kernel.
>
> Is it possible to limit the maximum CPU's frequency from hostboot or
> skiboot?
>From a skiboot perspective, we get possible frequencies from the OCC and
expose these to linux via the device tree. This is done in hw/occ.c
I *believe* the OCC will get this from processor VPD (but don't quote me
on it, that's mostly a pretty educated guess).
If you look at add_cpu_pstate_properties() in hw/occ.c, on p8 you'll see
that parse_pstates_v2() is what fills out the list.
As a hack for your workaround, you could filter the dt_id[] and
dt_freq[] arrays coming out of there to remove the states you don't want
enabled.
There *may* also be a way to do so via MRW.. but I'm not as familiar
with all the options there.
--
Stewart Smith
OPAL Architect, IBM.
More information about the OpenPower-Firmware
mailing list