From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: peterz@infradead.org, tglx@kernel.org, mingo@redhat.com,
linux-kernel@vger.kernel.org, will@kernel.org, boqun@kernel.org,
longman@redhat.com, rostedt@goodmis.org, clrkwllms@kernel.org,
dvhart@infradead.org, dave@stgolabs.net, andrealmeid@igalia.com,
shuah@kernel.org, juri.lelli@redhat.com,
linux-rt-devel@lists.linux.dev, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 5/5] locking/ww_mutex/test: Time an ABBA with both owners running
Date: Wed, 18 Nov 2026 19:45:24 +0100 [thread overview]
Message-ID: <20261118184524.Vxz_-nKr@linutronix.de> (raw)
In-Reply-To: <e57bdae9-4f87-4cc1-9fdc-22c2d766e252@efficios.com>
On 2026-11-18 12:29:55 [-0500], Mathieu Desnoyers wrote:
> Hi Sebastian,
Hi Mathieu,
> > 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?
The timeout that was introduced in commit cfa92b6d52071
("locking/ww_mutex/test: Make sure we bail out instead of livelock")
triggers. That is not related to your patch. Increasing the timeout
makes it go away. It takes ~7sec to complete. It is not related to your
changes.
According to the history it hangs on real hardware and passes in kvm.
> > 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.
The testsuite changes, without the fixes I get
| [ 0.810516][ T1] Beginning ww (wound) mutex selftests
| [ 7.388445][ T143] stress (stress_inorder_work) failed with -35
| [ 7.410548][ T1] Beginning ww (die) mutex selftests
| [ 13.994648][ T1] All ww mutex selftests passed
The ww_mutex testsuite complains only on PREEMPT_RT. The route cause is
the same. I don't see a difference on !PREEMPT_RT here nor do the
patches touch anything.
I don't call the shots here, I just explained why I don't see this
needed. We might want to cover this code path if the paths divert in
future. I don't know.
> > But in case we want this,
> > Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>
> Thanks!
>
> Mathieu
Sebastian
prev parent reply other threads:[~2026-11-18 18:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 14:13 [PATCH v2 0/5] locking/rtmutex: priority inheritance fixes and tests Mathieu Desnoyers
2026-11-08 14:13 ` [PATCH v2 1/5] locking/rtmutex: Stop spinning on the owner when the waiter is woken Mathieu Desnoyers
2026-11-16 12:06 ` Sebastian Andrzej Siewior
2026-11-16 18:36 ` Mathieu Desnoyers
2026-11-18 14:19 ` Sebastian Andrzej Siewior
2026-11-18 17:27 ` Mathieu Desnoyers
2026-11-18 18:51 ` Sebastian Andrzej Siewior
2026-11-08 14:13 ` [PATCH v2 2/5] locking/rtmutex: Initialize the ww_mutex context of a waiter Mathieu Desnoyers
2026-11-16 13:58 ` Sebastian Andrzej Siewior
2026-11-16 18:37 ` Mathieu Desnoyers
2026-11-18 14:40 ` Sebastian Andrzej Siewior
2026-11-18 17:28 ` Mathieu Desnoyers
2026-11-18 18:49 ` Sebastian Andrzej Siewior
2026-11-08 14:13 ` [PATCH v2 3/5] locking/rtmutex: Clone the sort keys in rt_mutex_enqueue_pi() Mathieu Desnoyers
2026-11-16 15:11 ` Sebastian Andrzej Siewior
2026-11-16 18:35 ` Mathieu Desnoyers
2026-11-08 14:13 ` [PATCH v2 4/5] selftests/futex: Test priority inheritance on PI futexes Mathieu Desnoyers
2026-11-16 16:56 ` Sebastian Andrzej Siewior
2026-11-16 18:48 ` Mathieu Desnoyers
2026-11-08 14:13 ` [PATCH v2 5/5] locking/ww_mutex/test: Time an ABBA with both owners running Mathieu Desnoyers
2026-11-18 16:38 ` Sebastian Andrzej Siewior
2026-11-18 17:29 ` Mathieu Desnoyers
2026-11-18 18:45 ` Sebastian Andrzej Siewior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118184524.Vxz_-nKr@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=andrealmeid@igalia.com \
--cc=boqun@kernel.org \
--cc=clrkwllms@kernel.org \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=longman@redhat.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
--cc=tglx@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®