LFENCE instruction (was: [rfc][patch 3/3] x86: optimise barriers)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mikulas Patocka
Date: Monday, October 15, 2007 - 1:47 pm

> According to latest memory ordering specification documents from Intel 

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
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
LFENCE instruction (was: [rfc][patch 3/3] x86: optimise ba ..., Mikulas Patocka, (Mon Oct 15, 1:47 pm)
Re: LFENCE instruction, H. Peter Anvin, (Tue Oct 16, 8:42 am)
Re: LFENCE instruction, Mikulas Patocka, (Tue Oct 16, 2:25 pm)