From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: cpuset/affinity interfaces and TSX lock elision in musl
Date: Sun, 19 May 2013 16:51:20 -0400 [thread overview]
Message-ID: <20130519205120.GF20323@brightrain.aerifal.cx> (raw)
In-Reply-To: <1368938432.2611.5@driftwood>
On Sat, May 18, 2013 at 11:40:32PM -0500, Rob Landley wrote:
> 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
> >
> >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 don't enter the kernel at all?
>
> I really don't see how lock elision is supposed to improve upon
> that. If you're optimizing the contended case, something is wrong.
Yes, that "something" is C++ (and by extension, glib, which might as
well be C++ but worse). But we're not in a position to fix it.
Rich
next prev parent reply other threads:[~2013-05-19 20:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 16:37 Daniel Cegiełka
2013-05-16 20:36 ` Rich Felker
2013-05-17 4:49 ` Rob Landley
2013-05-17 5:01 ` Rich Felker
2013-05-19 4:05 ` Rob Landley
2013-05-17 7:41 ` Daniel Cegiełka
2013-05-17 11:28 ` Szabolcs Nagy
2013-05-17 17:29 ` Rich Felker
2013-05-19 4:40 ` Rob Landley
2013-05-19 20:51 ` Rich Felker [this message]
2013-05-19 4:12 ` Rob Landley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130519205120.GF20323@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).