[PATCH] powerpc/rtas: retry when cpu offline races with suspend/migration
Nathan Lynch
nathanl at linux.ibm.com
Tue Jun 25 03:23:40 AEST 2019
Hi Mingming,
mmc <mmc at linux.vnet.ibm.com> writes:
> On 2019-06-21 00:05, Nathan Lynch wrote:
>> So return -EAGAIN instead of -EBUSY when this race is
>> encountered. Additionally: logging this event is still appropriate but
>> use pr_info instead of pr_err; and remove use of unlikely() while here
>> as this is not a hot path at all.
>
> Looks good, since it's not a hot path anyway, so unlikely() should
> benefit from optimize compiler path, and should stay. No?
The latency of this path in rtas_ibm_suspend_me() in the best case is
around 2-3 seconds.
So I think not -- this is such a heavyweight and relatively
seldom-executed path that the unlikely() cannot yield any discernible
performance benefit, and its presence imposes a readability cost.
More information about the Linuxppc-dev
mailing list