Re: [PATCH] rtmutex: Add acquire semantics for rtmutex lock acquisition

From: Sebastian Andrzej Siewior
Date: Fri Dec 02 2022 - 06:21:40 EST


On 2022-12-02 10:02:23 [+0000], Mel Gorman wrote:
> The lock owner is updated with an IRQ-safe raw spinlock held but the
> spin_unlock does not provide acquire semantics which are needed when
> acquiring a mutex. This patch adds the necessary acquire semantics for a
> lock operation when the lock owner is updated. It successfully completed
> 10 iterations of the dbench workload while the vanilla kernel fails on
> the first iteration.

I *think* it is

Fixes: 700318d1d7b38 ("locking/rtmutex: Use acquire/release semantics")

Before that, it did cmpxchg() which should be fine.

Regarding mark_rt_mutex_waiters(). Isn't acquire semantic required in
order for the lock-owner not perform the fastpath but go to the slowpath
instead?

Sebastian