From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11524 Path: news.gmane.org!.POSTED!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] a new lock algorithm with lock value and CS counts in the same atomic int Date: Sun, 18 Jun 2017 23:38:08 +0300 (MSK) Message-ID: References: <868874$8age42@mail2-relais-roc.national.inria.fr> <20170618145339.GU1627@brightrain.aerifal.cx> <20170618160459.GW1627@brightrain.aerifal.cx> <20170618213209.260ae8e4@inria.fr> <20170618202009.GX1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1497818299 6707 195.159.176.226 (18 Jun 2017 20:38:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 20:38:19 +0000 (UTC) User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) To: musl@lists.openwall.com Original-X-From: musl-return-11537-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jun 18 22:38:16 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dMgxc-0001Zt-77 for gllmg-musl@m.gmane.org; Sun, 18 Jun 2017 22:38:16 +0200 Original-Received: (qmail 18373 invoked by uid 550); 18 Jun 2017 20:38:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 18355 invoked from network); 18 Jun 2017 20:38:19 -0000 In-Reply-To: <20170618202009.GX1627@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:11524 Archived-At: On Sun, 18 Jun 2017, Rich Felker wrote: > > If we want code sharing with the rest of musl (which we should) I like > > Alexander's idea of a __futexwait inline function much better. > > I don't think there's any value to making it inline. If it could be a > single syscall, that would be one thing, but with the fallback for old > systems that lack private futex, it's just a gratuitously large inline > chunk that's likely to interfere with inlining/optimization of the > caller, and certainly has no potential to improve performance (since > there's a syscall involved). The original suggestion was to move two syscalls into a static inline function, with contents mirroring those of __wake. If that's too large, then so is __wake (and all you've said applies equally to __wake, which is static inline). Alexander