From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795027536; b=iO86OYLDAGi+Gn2Wx0C1eC/RfA3aCYS1ARw1TlBcmkWZrC+tBo4GwYl/Ijly6NKxMJRb iFE3135EpT26oL5WbswmyVTSaBa/I8ggFEC0lWzbgXgXhwHGwCiJfLmraowaRO5LV9Ws0 egU5mQkVMcqnx34EFs+rMPeiPEYLv1G+fG1XkdcIQ2MYrSVwGpJgAmWh9k7w+Lq6aV0AJ mKQ2KSCm84Idoq+B4aKFolfszzN/cPzOOzwFxC+Du3DLQZN/ONeDh7ZCTEF92rCQs+7Cw YM3+1utz0mDRwxpsat9fyZr4qWGq2YBJv3wHQePDP7c38IC5R/jyUh4KRI+o4w06ArA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795027536; h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=vGWUgyGfw7j22BMb4pU06ctXkLaCqXf8bR6lTYcnToQ=; b=VbiJOP8+eJBYSAIUghaZQIfoU5ZxUpMyAk73E8e4l6h7zTekQu0h7cfxrXV2FlaGwmXj gSAw4dLGD1Euw7ZaBBHZUhnBjqYPg6ZurgWRHSl3pqXMnuqiCtlmDlgVHQAhTQ4P6Eprp 3osS2c2HyI/qiiCvMexzCqVozmi5wvVXVckpLFX1Ox0FiZpvyZbmH+U/Voc920qrRxmW1 nRq4UCPkAn8Nvu8dr3p0wfdd7e7OoJaQQYg2dD2MhQpIZe4DKj0BxXnC66wC/BCxarsPf 0HdNYZYv0lUuGoiEVKOqYpfEvIIBv9KkoYStaGFX+gWWl5wctKw4cx+gL+FXPYufF4g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=IQCQA2zd; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=IB0tl0dO; arc=none smtp.remote-ip=193.142.43.55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06FA860A260E; Wed, 18 Nov 2026 18:45:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 06FA860A260E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=IQCQA2zd; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=IB0tl0dO Date: Wed, 18 Nov 2026 19:45:24 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1795027526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vGWUgyGfw7j22BMb4pU06ctXkLaCqXf8bR6lTYcnToQ=; b=IQCQA2zdkTcf9E6mhzzRMaLYIbiNdjO5KRf7VnD1VGfQrT6qv3DniWkbigfsq+bhE6Tujk RrogTYi0aSVRHhW+5nEICKshtgXZ20WtT7qg76ppTdO/A9i69qiyJmz6EOdcL/CDrqbKl6 RO5pEABTAuySwUj8DFCvw0Uju+upOqm4vWES9HTXn0F67xMBEkb/G5w6AVBGg/2hLlwcgK w8Q0kxcrt8oqGQUJOyp2nN68x+Uy/nby68mlXbMYoltILfitXFV2/387HEW6HseduaC4Gw auMtX0afIROcw0m2kbOpTHB0HEJe4ZzBscTzHUsrwHpQIdRKrhzK6sznwFM7nw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1795027526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vGWUgyGfw7j22BMb4pU06ctXkLaCqXf8bR6lTYcnToQ=; b=IB0tl0dO0GEA+iI8A5RmjHEUCuLm9UMaL/bBsKz0K1j3Ghz/dISF3vGZHh1wz6CpgDAsRt C1fdWc9vPTxswjCw== From: Sebastian Andrzej Siewior To: Mathieu Desnoyers 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 Message-ID: <20261118184524.Vxz_-nKr@linutronix.de> References: <20261108141347.1525532-1-mathieu.desnoyers@efficios.com> <20261108141347.1525532-6-mathieu.desnoyers@efficios.com> <20261118163807.75hxTxGn@linutronix.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: 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=E2=80=A6 >=20 > 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. >=20 > 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 >=20 > Thanks! >=20 > Mathieu Sebastian