[Skiboot] [PATCH v5] occ: Poll OCC throttle status and queue OCC events to host

Preeti U Murthy preeti at linux.vnet.ibm.com
Sat Jun 20 02:59:01 AEST 2015


On 06/18/2015 05:07 PM, Shilpasri G Bhat wrote:
> Add a new class of message definition OPAL_MSG_OCC to
> opal_message_type to notify the following OCC events to host:
> 1) OCC Reset
> 2) OCC Load
> 3) OCC Throttle Status Change
> 
> Add an opal poller to periodically read throttle status updated by OCC
> for each chip and notify any change in throttle status to host. The
> throttle status indicates the reason why OCC may have limited the max
> Pstate of the chip.
> 
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>
> ---
> Changes from V4:
> - Add 'occ_lock' to protect writes to 'occ_reset' and serialize queuing
>   of OCC_RESET and OCC_THROTTLE to host
> - Rename chip->prev_throttle to chip->throttle
> - Remove the code to queue OCC_RESET in throttle_poll if
>   occ_data->valid=0 and occ_reset=false. This was added to mitigate
>   the effects of receiving simultaneous FSP_OCC_RESET messages. This
>   race will be solved by the 'occ_lock'.

To make it more clear, this is actually to mitigate the effect of the
race between checking and setting of occ_reset between
occ_throttle_poll() and occ_reset().

The patch looks good.

Reviewed-by: Preeti U Murthy <preeti at linux.vnet.ibm.com>



More information about the Skiboot mailing list