public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* LFENCE instruction (was: [rfc][patch 3/3] x86: optimise barriers)
@ 2007-10-15 20:47 Mikulas Patocka
  2007-10-15 21:37 ` Arjan van de Ven
  0 siblings, 1 reply; 17+ messages in thread
From: Mikulas Patocka @ 2007-10-15 20:47 UTC (permalink / raw)
  To: Nick Piggin; +Cc: Linux Kernel Mailing List

> According to latest memory ordering specification documents from Intel 
> and AMD, both manufacturers are committed to in-order loads from 
> cacheable memory for the x86 architecture. Hence, smp_rmb() may be a 
> simple barrier.
>
> http://developer.intel.com/products/processor/manuals/318147.pdf 
> http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24593.pdf

Hi

I'm just wondering about one thing --- what is LFENCE instruction good 
for?

SFENCE is for enforcing ordering in write-combining buffers (it doesn't 
have sense in write-back cache mode).
MFENCE is for preventing of moving stores past loads.

But what is LFENCE for? I read the above documents and they already say 
that CPUs have ordered loads.

In Intel instruction reference, the description for LFENCE is copied from 
SFENCE (with the word "store" replaced with the word "load"), so it 
doesn't really give much insight into the operation of the instruction.

Or is LFENCE just a no-op reserved for the possibility that Intel would 
relax ordering rules?

Mikulas

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-10-18 17:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-15 20:47 LFENCE instruction (was: [rfc][patch 3/3] x86: optimise barriers) Mikulas Patocka
2007-10-15 21:37 ` Arjan van de Ven
2007-10-15 22:08   ` Mikulas Patocka
2007-10-16  0:11     ` H. Peter Anvin
2007-10-16 10:17       ` Mikulas Patocka
2007-10-16 15:42         ` LFENCE instruction H. Peter Anvin
2007-10-16 21:25           ` Mikulas Patocka
2007-10-16  0:22     ` LFENCE instruction (was: [rfc][patch 3/3] x86: optimise barriers) Nick Piggin
2007-10-16 10:33       ` Mikulas Patocka
2007-10-16 22:29         ` Nick Piggin
2007-10-16 23:05           ` Mikulas Patocka
2007-10-16 23:21             ` Nick Piggin
2007-10-17  0:30               ` Mikulas Patocka
2007-10-17 12:24                 ` Nick Piggin
2007-10-18 17:06                   ` Mikulas Patocka
2007-10-17  5:51       ` Herbert Xu
2007-10-17 12:28         ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox