From owner-freebsd-threads@freebsd.org Wed Dec 23 21:31:00 2015 Return-Path: Delivered-To: freebsd-threads@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5B47A50CCB for ; Wed, 23 Dec 2015 21:31:00 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B25591FA5 for ; Wed, 23 Dec 2015 21:31:00 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id AF86EA50CC7; Wed, 23 Dec 2015 21:31:00 +0000 (UTC) Delivered-To: threads@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEB55A50CC5; Wed, 23 Dec 2015 21:31:00 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.netplex.net", Issuer "RapidSSL SHA256 CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A7A31FA2; Wed, 23 Dec 2015 21:31:00 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.15.1/8.15.1/NETPLEX) with ESMTP id tBNLUwLg005586; Wed, 23 Dec 2015 16:30:58 -0500 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.4.3 (mail.netplex.net [204.213.176.9]); Wed, 23 Dec 2015 16:30:58 -0500 (EST) Date: Wed, 23 Dec 2015 16:30:58 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net Reply-To: Daniel Eischen To: Konstantin Belousov cc: threads@freebsd.org, arch@freebsd.org Subject: Re: libthr shared locks In-Reply-To: <20151223201837.GW3625@kib.kiev.ua> Message-ID: References: <20151223172528.GT3625@kib.kiev.ua> <20151223190519.GU3625@kib.kiev.ua> <20151223201837.GW3625@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 21:31:00 -0000 On Wed, 23 Dec 2015, Konstantin Belousov wrote: > On Wed, Dec 23, 2015 at 02:48:56PM -0500, Daniel Eischen wrote: >> >> If the application creates the object itself or allocates storage >> for it, basically, if it isn't opaque, yes. But we can bump port >> revisions for affected libraries (probably just searching >> /usr/local/include/... for pthread_mutex, pthread_cond, etc >> types to see possible problems. I did a search for the installed >> ports on my system and found a few that might cause problems. > > This relegates the issue to an attempt to do the full rebuild. But I > do not see how the port bump would fix it, assume that you are updating > from the 10.x to 11.x and have the mix of the libraries, some of which > were built during the 10.x lifetime but with the bumped ports version. > > It is not feasible to do a reliable audit of the 24+ Kports. Is it really that hard to do a port run and insert a grep for pthread_{mutex,cond,rwlock}_t in a ports installed header files? Then just blindly bumping portrevisions for those ports and those depending on it? Other than errors caused by storage layouts, libthr can easily be instrumented to emit a warning when a sync type is used with the wrong versioned function. >> I think we're just putting off the inevitable. Do we not want >> to change our pthread sync types anyway, to get rid of an extra >> dereference per lock? To get rid of the hacks in libc, rtld, >> etc? >> >> If the answer is no, we never want to do that, then ok. > > An answer to this question requires a) consensus b) a workforce that > would do the decided transition. I evaluated my opinion, potential > consequences and efforts required, and ended up with the posted patch. There's an old patch here: http://people.freebsd.org/~davidxu/pshared/patch6.diff -- DE