From owner-svn-src-head@freebsd.org Wed Jan 30 05:37:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68EE14B494D; Wed, 30 Jan 2019 05:37:09 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61DEA83041; Wed, 30 Jan 2019 05:37:09 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 5010A251; Wed, 30 Jan 2019 05:37:09 +0000 (UTC) Date: Wed, 30 Jan 2019 05:37:09 +0000 From: Alexey Dokuchaev To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343566 - in head/lib/libthr: . thread Message-ID: <20190130053709.GA35927@FreeBSD.org> References: <201901292246.x0TMkjQH074121@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201901292246.x0TMkjQH074121@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 61DEA83041 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.86 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.87)[-0.866,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2019 05:37:10 -0000 On Tue, Jan 29, 2019 at 10:46:45PM +0000, Konstantin Belousov wrote: > New Revision: 343566 > URL: https://svnweb.freebsd.org/changeset/base/343566 > > Log: > Untangle jemalloc and mutexes initialization. > > The need to use libc malloc(3) from some places in libthr always > caused issues. For instance, per-thread key allocation was switched to > use plain mmap(2) to get storage, because some third party mallocs > used keys for implementation of calloc(3). > > Even more important, libthr calls calloc(3) during initialization of > pthread mutexes, and jemalloc uses pthread mutexes. Jemalloc provides > some way to both postpone the initialization, and to make > initialization to use specialized allocator, but this is very fragile > and often breaks. See the referenced PR for another example. Could this also fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220767 I wonder... Going through the "make world" now to test some Quake II. :-) ./danfe