From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3338 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: cpuset/affinity interfaces and TSX lock elision in musl Date: Sat, 18 May 2013 23:40:32 -0500 Message-ID: <1368938432.2611.5@driftwood> References: <20130516203658.GW20323@brightrain.aerifal.cx> <20130517112802.GA6699@port70.net> <20130517172902.GC20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1368938451 24741 80.91.229.3 (19 May 2013 04:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 May 2013 04:40:51 +0000 (UTC) Cc: musl@lists.openwall.com To: musl@lists.openwall.com Original-X-From: musl-return-3342-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 19 06:40:51 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UdvQN-0004Gh-MK for gllmg-musl@plane.gmane.org; Sun, 19 May 2013 06:40:47 +0200 Original-Received: (qmail 1499 invoked by uid 550); 19 May 2013 04:40:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1485 invoked from network); 19 May 2013 04:40:46 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:subject:to:cc:references:in-reply-to:x-mailer :message-id:mime-version:content-type:content-disposition :content-transfer-encoding:x-gm-message-state; bh=e+/5bY13AaTCw/blZrPg3KyTvTVOopJxzclVaZ09D9s=; b=oQ2w1EsW7nZ1ajd9NOHT32PoTYDQt1NnFBUSvJSFcrGOFdFfRTSaC4+GWLXIXzzTrP 1tnA3DoCujksDmr+atkC/v2JMPxOqKdfEZCGZQr10XmUwlVyCCX3qQGr2eI0SC+dnT94 SnblDpYOind/mEKa9T+AgmRBbEezKbs0io6M0haqBuNwlFAfuyj3OREGRTdn2uIjqJ8Q CzbgMK5TGC/DdyhOruTSifTZkwh9B7SMlNeUWmIbzFBVx+zeg3+mDnkatriPVki+886N FVk5s1P9xY4ZmEM0HN0SWAscCHd5Jzc3zJ24LUR1go3r34FICdtgwMmW90yHrzYpS0Fj fC2A== X-Received: by 10.50.176.228 with SMTP id cl4mr1769136igc.7.1368938434733; Sat, 18 May 2013 21:40:34 -0700 (PDT) In-Reply-To: <20130517172902.GC20323@brightrain.aerifal.cx> (from dalias@aerifal.cx on Fri May 17 12:29:03 2013) X-Mailer: Balsa 2.4.11 Content-Disposition: inline X-Gm-Message-State: ALoCoQk2mAD2qn+UgT50LecILJKx9XgJ49fFMGIf9gfI5x2xZ4A3JlkYeZW+f18y3ZBSsYaIoiw/ Xref: news.gmane.org gmane.linux.lib.musl.general:3338 Archived-At: On 05/17/2013 12:29:03 PM, Rich Felker wrote: > > locks should not be the bottleneck in applications > > unless there is too much shared state on hot paths, > > which is probably a design bug or a special use-case > > for which non-standard synchronization methods may > > be better anyway >=20 > One place where there is unfortunately a huge amount of shared state > is memory management; this is inevitable. Even if we don't use lock > elision for pthread locks, it might be worth considering using it > _internally_ in malloc when it's available. It's hard to say without > any measurements, but this might result in a malloc that beats > ptmalloc, etc. without any thread-locale management. I thought the point of futexes was that in the non-contention case you =20 don't enter the kernel at all? I really don't see how lock elision is supposed to improve upon that. =20 If you're optimizing the contended case, something is wrong. Rob=