Re: [PATCH v2 5/5] locking/ww_mutex/test: Time an ABBA with both owners running

From: Mathieu Desnoyers

Date: Wed Nov 18 2026 - 12:37:58 EST


Hi Sebastian,

> This is the ww_mutex equivalent of the futex case on PREEMPT_RT. I got
> lightly distracted by the -35/-EDEADLK error it always returns.
> Something that we might have since v5.16-rc1…

Where do you see it? In this case, the younger context gets -EDEADLK
from ww_mutex_lock(A). That is the wound: it backs off and retries, and
the case returns 0. In our PREEMPT_RT VMs, test-ww_mutex loads with 0.
If a case of the module returns -35 on your setup, I can look into it.
Which case prints it?

> Since both (ww-mutex and futex) use the same code I am tempted to say
> that one test case might be enough.

The two take different wakeups through the same spin. A timeout or a
signal wakes the futex waiter, and its cases fail with and without
PREEMPT_RT. The wound wakes this one, and it fails only with
PREEMPT_RT. I would keep it, but I can drop it if you prefer.

> But in case we want this,
> Tested-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

Thanks!

Mathieu


--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com