Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp493456rdb; Mon, 15 Jan 2024 04:16:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRRqowHqrYab8w9reK2EdNh+hOfSXrdXqcQ/3mWBVdMV7afNRzuVWtcUZNvs6uVFtrEcWJ X-Received: by 2002:a05:6214:27c7:b0:681:6855:b2c0 with SMTP id ge7-20020a05621427c700b006816855b2c0mr166850qvb.116.1705321005017; Mon, 15 Jan 2024 04:16:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705321005; cv=none; d=google.com; s=arc-20160816; b=TcxnU+WUkHPCQLU31j8335o02mcR9gVSq2Pkt3PGcHk7Sg5wLjAunhjbKGKYBT3H7U zGESf3yAN6f6Y9WdXZcQVZX9CTXBdIX/zfZHhY6AXGdtaosEBPC2C7t35ysAVmUzWRv1 iRD51SDrknPkCqHcLxTa5EZMUZss+HDaFbVBYm+e2G3Dt31g6c19lnkZacfcoO4cfQDQ RDhc3LwGqz6uOcPFULeTkTavWgRrDKSWmeL1qfxQFsVcQF06eeT4Y1diQK4B9DdtP8Tv A4BhaFqRNB1wt5SUfkp4V6xdWVMYKL9TQnX2SeitkMIFfpTrVTug8qEEDmOlFcv3Dakx fvDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=A63dnTEunn6abrgl1DMAdxbjpOLX71DXc8GdsI+71XQ=; fh=TwNqUFSmIMOqf0jJT3OFrbyEp53PQPHpoYFWZl7pO7E=; b=LdOeBEgFxEHjpHDQMFt72XIr3+Q/F1TdIKdbG3IqGo6cncXJ4QKune97hacx59M0Bk 6pjT7TvYDvUO+wcDZI+wFKl6bDEd5ZqLoTu3O3ZCRSLMQU/qIwt06dvrqbstKwUzHUPN r+q383w7vicE+7zeFpfCvXO1TsUguIzd6ErPomtMmevfOT2xycrkUx7kxW7Jc1o6OGGB cUEjL4MbDvxSN2pWxK69/bZCr0GLl9PmNIwvZ3HKBFbk/Kc2TFXRNmHdsC68IthEHT37 /Rm/sjif4//9Xn1kt9QvEpu0ZnG0inqkE3x+TSBNEqVb+hHv/EGdezHS1bL+ToXF9KLy 1+FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0VowHk1N; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-25958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u9-20020ad45aa9000000b00680503eb91bsi8346997qvg.165.2024.01.15.04.16.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 04:16:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0VowHk1N; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-25958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C02601C212FB for ; Mon, 15 Jan 2024 12:16:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3780F2C69E; Mon, 15 Jan 2024 12:16:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0VowHk1N"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ajYtVmYg" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C9E42C68C for ; Mon, 15 Jan 2024 12:16:35 +0000 (UTC) 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 Date: Mon, 15 Jan 2024 13:16:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1705320993; 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=A63dnTEunn6abrgl1DMAdxbjpOLX71DXc8GdsI+71XQ=; b=0VowHk1NjlV4sPsWA/CoMJRNK0giD2At3qR0e516ghXPB/H2kHVoc/WyGV700szWe+yxJa +O3vZRkN/uCUTQfgbS8EjDZcfHkml7E9f8F5uMuLN25WVTnj6jL1TqmJ4U/eZKzdOwX2GH dlN/w9jLMj4Vh6RgaHf7v2+jfpayQfoTFuhGNVVA4mF1rZX7ffd5e6HbbQg6/VQT+TpFXz t3FgBWa4yQlPTAmMyz+Obvvocd99+CYu+x/jwK0QlYMx4vYBYEfmS3AJ3ICFRb+JI1UCWj xE0oeXw2q6VO2fUlLqEukl42KQ7UMA18iVWxh4mg2QesnvDQSIEjGDLT0MHSsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1705320993; 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=A63dnTEunn6abrgl1DMAdxbjpOLX71DXc8GdsI+71XQ=; b=ajYtVmYgU1GYi8NrhDWfauo3tHg7qxVMD3tXPGGm86wn+JPqYNqDIwyFUBs/MQRASWGkyH jX32nPdnRUzkMYAw== From: Sebastian Andrzej Siewior To: Jiri Slaby Cc: Peter Zijlstra , Thomas Gleixner , linux-kernel@vger.kernel.org, boqun.feng@gmail.com, bristot@redhat.com, bsegall@google.com, dietmar.eggemann@arm.com, jstultz@google.com, juri.lelli@redhat.com, longman@redhat.com, mgorman@suse.de, mingo@redhat.com, rostedt@goodmis.org, swood@redhat.com, vincent.guittot@linaro.org, vschneid@redhat.com, will@kernel.org Subject: Re: [PATCH v3 7/7] locking/rtmutex: Acquire the hb lock via trylock after wait-proxylock. Message-ID: <20240115121632.FX1P0-fi@linutronix.de> References: <20230908162254.999499-1-bigeasy@linutronix.de> <20230908162254.999499-8-bigeasy@linutronix.de> <20230911141135.GB9098@noisy.programming.kicks-ass.net> <87fs3f1tl0.ffs@tglx> <20230915151943.GD6743@noisy.programming.kicks-ass.net> <4611bcf2-44d0-4c34-9b84-17406f881003@kernel.org> <9f75eb59-9b7a-4b49-9081-e6a3cbb00187@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <9f75eb59-9b7a-4b49-9081-e6a3cbb00187@kernel.org> On 2024-01-15 12:52:49 [+0100], Jiri Slaby wrote: =E2=80=A6 > >=20 > > The child in fact terminates on > > https://github.com/apache/apr/blob/trunk/test/testprocmutex.c#L93: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 while ((rv =3D apr_proc_mutex_timedlock(proc_lock, 1)= )) { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!APR_STATUS_IS_TIMEUP(rv)) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit(= 1); <----- here > >=20 > > The test creates 6 children and does some > > pthread_mutex_timedlock/unlock() repeatedly (200 times) in parallel > > while sleeping 1 us inside the lock. The timeout is 1 us above. And the > > test expects all them to fail (to time out). But the time out does not > > always happen in 6.7 (it's racy, so the failure is semi-random: like 1 > > of 1000 attempts is bad). >=20 > This is not precise as I misinterpreted. The test is: either it succeeds = or > times out. >=20 > But since the commit, futex() yields 22/EINVAL, i.e. fails. Let me see if I can reproduce it here=E2=80=A6 Sebastian