Re: [PATCH] pstore: Revert pmsg_lock back to a normal mutex

From: Peter Zijlstra
Date: Tue Mar 07 2023 - 09:14:12 EST


On Fri, Mar 03, 2023 at 06:11:34PM +0000, Joel Fernandes wrote:
> What makes the rtmutex spin logic different from normal mutex in this
> scenario, so that rtmutex wants to do that but normal ones dont?

Regular mutex uses osq 'lock' to serialize waiters and only the top
spinner gets to spin on the mutex itself, this greatly reduces the
contention on the mutex.

OSQ is FIFO, which is not what RT-mutex needs.