There's some concern this could retry forever, resulting in live lock.
Another approach would be to abandon the attempt and fail the LPM
request.
https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-June/192531.html
On 6/24/19 12:23 PM, Nathan Lynch wrote:
Hi Mingming,
mmc <m...@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.