From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] replace a mfence instruction by an xchg instruction
Date: Sun, 16 Aug 2015 13:00:51 -0400 [thread overview]
Message-ID: <20150816170051.GS31018@brightrain.aerifal.cx> (raw)
In-Reply-To: <1439743112.9803.40.camel@inria.fr>
On Sun, Aug 16, 2015 at 06:38:32PM +0200, Jens Gustedt wrote:
> Am Sonntag, den 16.08.2015, 12:28 -0400 schrieb Rich Felker:
> > On Sat, Aug 15, 2015 at 08:51:41AM +0200, Jens Gustedt wrote:
> > > according to the wisdom of the Internet, e.g
> > >
> > > https://peeterjoot.wordpress.com/2009/12/04/intel-memory-ordering-fence-instructions-and-atomic-operations/
> > >
> > > a mfence instruction is about 3 times slower than an xchg instruction.
> >
> > I can't find where the article makes this claim. Could you point out
> > what part you're referring to?
>
> I read this in the section that says "Performance comparsion".
>
> There it says something like "lock xchg" 16x baseline and "smfence"
> 47-67 x baseline. But perhaps I am misinterpreting things.
This is comparing an idiotic (and invalid, but maybe barely-working on
x86) Dekker lock using mfence with a simple xchg-based lock. It's not
comparing mfence to lock-xchg as barriers.
Rich
prev parent reply other threads:[~2015-08-16 17:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-15 6:51 Jens Gustedt
2015-08-15 20:17 ` Rich Felker
2015-08-15 21:01 ` Jens Gustedt
2015-08-15 23:28 ` Rich Felker
2015-08-16 12:42 ` Jens Gustedt
2015-08-16 15:16 ` Rich Felker
2015-08-16 15:50 ` Jens Gustedt
2015-08-16 15:58 ` Rich Felker
2015-08-16 16:16 ` Jens Gustedt
2015-08-16 18:30 ` Rich Felker
2015-08-16 16:07 ` Rich Felker
2015-08-16 16:34 ` Jens Gustedt
2015-08-16 16:28 ` Rich Felker
2015-08-16 16:38 ` Jens Gustedt
2015-08-16 17:00 ` Rich Felker [this message]
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=20150816170051.GS31018@brightrain.aerifal.cx \
--to=dalias@libc.org \
--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).