SFENCE
SFENCE is an x86 instruction that orders earlier stores to become globally visible before later stores.
Scope: SFENCE does not order memory loads or LFENCE. Store visibility is not, by itself, proof that data will survive a power failure. [1]
On an ADR-backed persistent-memory mapping, write back the required cache lines before the fence. A detected eADR domain can remove explicit cache-line writeback, but ordering obligations remain. A fence does not make ordinary DRAM nonvolatile. [2]
Batching: a mapping-specific drain can complete prior flushes without a separate drain for each region. Mappings can share one drain call when their drain function is the same. This does not flush arbitrary dirty data or provide an atomic commit. [3] [4]
Recovery must tolerate stores becoming persistent before an explicit persist call. Completing persistence of a range does not make a multi-line update all-or-nothing. [4]
Relations
Citations
- Intel SDM 093, Vol. 2B: SFENCE, printed page 4-628.
- PMem project glossary: Fence, ADR and eADR.
- PMDK 1.13.1: pmem2_get_drain_fn, mapping-specific flush completion.
- PMDK 1.13.1: pmem2_get_persist_fn, batching and non-transactional semantics.
Further reading
Sources & caveats
- Instruction semantics follow Intel SDM revision 093, September 2026. The PMDK interface contract is pinned to 1.13.1.
- Source synthesis only; no persistent-memory device, power-cut experiment or latency measurement.