[Skiboot] [PATCH] occ: Filter out entries from Pmin to Pmax in pstate table

Balbir Singh bsingharora at gmail.com
Mon Apr 18 16:03:26 AEST 2016

On 18/04/16 15:32, Shilpasri G Bhat wrote:
> Hi Balbir,
> On 04/18/2016 10:39 AM, Balbir Singh wrote:
>> On 16/04/16 03:12, Shilpasri G Bhat wrote:
>>> Parse the entire pstate table provided by OCC and filter out the
>>> entries that are outside the Pmax and Pmin limits. This can
>>> occur when turbo mode is disabled and OCC limits the Pmax to
>>> nominal pstate, but includes turbo pstates in the pstate table.
>>> We end up with wrong pstates in such cases if we do not parse
>>> the pstate table to filter out the correct range.
>>> Signed-off-by: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>
>> Can turbo mode be turned on/off without rebooting? We seem to be doing
>> this once during boot. Shouldn't the OS handle the pmax/pmin checks?
> No. Turbo mode is turned on/off during boot. This issue can not be solely
> handled in OS.
> The issue here is skiboot parses the pstate table upto nr_pstates and
> nr_pstates = pmax - pmin + 1
> Now if turbo is disabled, we have pmax = nominal_pstate and pstate table
> contains pstate entries from turbo to pmin. And skiboot parses the upper portion
> of nr_pstates entries which is starting from turbo and not the actual pmax which
> is nominal pstate. Thus resulting in exporting smaller set of valid pstates to
> the host. So we need skiboot to filter out the correct pstate range.
Fair point!

I was wondering if we just expose all the pstates including p_min and p_max and
nr_pstates, the OS might be better at filtering states and implementing the
right thing in the future without requiring a reboot (may be in the future).
We might be able to show turbo p-states and show them as disabled in the OS

Balbir Singh.

More information about the Skiboot mailing list