lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49066840.2070408@cn.fujitsu.com>
Date:	Tue, 28 Oct 2008 09:17:52 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH tip/tracing/markers] new probes manager

Ingo Molnar wrote:
> * Mathieu Desnoyers <compudj@...stal.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ