lkml.org 
[lkml]   [2008]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/tracing/markers] new probes manager
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



\
 
 \ /
  Last update: 2008-10-28 02:23    [W:0.619 / U:24.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site