From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH tip/tracing/markers] new probes manager
Date: Tue, 28 Oct 2008 09:17:52 +0800 [thread overview]
Message-ID: <49066840.2070408@cn.fujitsu.com> (raw)
In-Reply-To: <20081027182655.GA11494@elte.hu>
Ingo Molnar wrote:
> * Mathieu Desnoyers <compudj@krystal.dyndns.org> wrote:
>>> Do you have performance measurements for this ? On x86 it's a nop,
>>> AFAIK.
>> My statement above is inexact : x86_64 uses lfence for rmb(). But
>> numbers would still be welcome.
>
> yes, the statement that rmb() is very expensive looks dubious. It is
> absolutely cheap everywhere.
>
> Ingo
>
>
>
On x86 it's _NOT_ a nop.
i386
#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
uses the "lock" prefix.
x86_64
#define rmb() asm volatile("lfence":::"memory")
uses the "lfence"
these two are harm for cache. rmb is exactly a expensive operator.
rmb() is indeed cheaper than any other atomic-operator(atomic, spin_lock .. etc)
everywhere. but In a fast path, avoiding rmb() is worthy.
Thanx, Lai
prev parent reply other threads:[~2008-10-28 1:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 2:47 [PATCH tip/tracing/markers] new probes manager Lai Jiangshan
2008-10-27 15:58 ` Mathieu Desnoyers
2008-10-27 16:30 ` Mathieu Desnoyers
2008-10-27 18:26 ` Ingo Molnar
2008-10-27 23:13 ` Paul Mackerras
2008-10-28 1:17 ` Lai Jiangshan [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=49066840.2070408@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=compudj@krystal.dyndns.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox