From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by sourceware.org (Postfix) with ESMTPS id 92CF33857020 for ; Tue, 22 Jun 2021 14:25:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 92CF33857020 From: Kurt Kanzenbach To: Adhemerval Zanella , libc-alpha@sourceware.org Cc: Florian Weimer , Carlos O'Donell , Thomas Gleixner , Sebastian Andrzej Siewior Subject: Re: [PATCH RFC 0/3] nptl: Introduce and use FUTEX_LOCK_PI2 In-Reply-To: <93a48890-f364-c44f-43ce-dd97c8092ef0@linaro.org> References: <20210621111650.1164689-1-kurt@linutronix.de> <87h7hql5qm.fsf@kurt> <93a48890-f364-c44f-43ce-dd97c8092ef0@linaro.org> Date: Tue, 22 Jun 2021 16:25:06 +0200 Message-ID: <877dimkmd9.fsf@kurt> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 14:25:11 -0000 --=-=-= Content-Type: text/plain On Tue Jun 22 2021, Adhemerval Zanella wrote: > Besides what Florian has explained about __ASSUME_* macros, another issue we > have static initialization for pthread_mutex. So the syscall probe only > works for dynamic initialization (where caller issue a pthread_mutex_init). > > I view this as an inconsistent behavior and I don't have a straightforward > solution that won't result in a performance penalization for common cases > (it would require to probe for FUTEX_LOCK_PI2 *and* FUTEX_LOCK_PI). > > Instead I think we should move the possible error on the slow path and let > the kernel advertise it any missing support. OK, good. That makes the timedlock implementation straight forward. I implemented it and started testing now with different Linux kernels. A new version of patch set should be ready next week or so. Thanks, Kurt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEooWgvezyxHPhdEojeSpbgcuY8KYFAmDR8sITHGt1cnRAbGlu dXRyb25peC5kZQAKCRB5KluBy5jwpgTUD/4h+MfqA5yw2rqm7BKB40yafbnZmd6N oC5hEU9K42h+kFzEa/CqNPYmDqbGLQN2h2kSAhMQbp6+2hELFv0nO6gG9SjzGcTU 3YUf80vVRpHHs5kmJKb4nSTiI0sjm0v3fbeejjJZ9HMULJjbhk54dMD4UQmh86UT tiQaSa7VCrOxuxXJ0iDnrv07HPV2ZanuqtY048iUFY4QxpjoqBZPqAKSKfPIkqQz CI6DIdWb8N/5mhscSlnaryYKg0CFt8pJSJlD9J6EthSYoQ9Yc1cnFzFoVhzTwEJI ITsr0Eqps5Q9m9farLNj+SpDwxyo72zH76JqWJkUN0qRtBU1GE2+sCOv91R0BxmK RfO+M2TYdNMwb7gXqwPTwTpzEiKwneCxK2NfkpJ8VvMnjkpmNQtUMX9TP6l6deMu SZ2QuRwFxouR+joHDFUoG1PBVLLQTiDfT9zJEcmbHJlsH3dnMaCRNTmvzDiMe2Hy kof9hzwbRT3CvjofWIz7kAoVl3OQc4RhUI8scTz9RD4hp2t8U19IaWwoWJ2KmUCK vFBvLA7gMvow/z2vb9ReWiGznrVZpdECVdVJOCcsSNPRMlxQNk87OlfLwdqvYXQY zYcTa+SyDSyYNlTtFUThWhHd889zWyb0MvGTrIni+h7TxNGdw66qHyLfc7xsFTwJ RWYfOoNRLunTbw== =Tgfb -----END PGP SIGNATURE----- --=-=-=--