CLFLUSHOPT
CLFLUSHOPT is an x86 instruction that invalidates a CPU cache line across its coherence domain and writes back any modified contents.
Support is advertised by CPUID leaf 7, subleaf 0, EBX bit 23. Speculative refills can occur around invalidation, so a later cache miss is not guaranteed. [1]
Multiple flushes can overlap. A following SFENCE supplies the ordering needed before relying on their completion in the persistent-memory protocol. This is a CPU-cache operation, not a storage-device cache-flush command. [2]
Use the persistence function for the actual mapping. Persisting a range neither combines it into a transaction nor prevents some stores from becoming durable earlier. [3]
Relations
- related
- CLWB, Persistence domain, Asynchronous DRAM Refresh, Extended Asynchronous DRAM Refresh, Storage cache flush, SFENCE
Citations
- Intel SDM 093, Vol. 2A: CLFLUSHOPT (3-146) and CLWB (3-154).
- PMem project glossary: CLWB, CLFLUSHOPT, ADR, eADR and fences.
- PMDK 1.13.1: pmem2_get_persist_fn, flush/drain and non-transactional semantics.
Further reading
Sources & caveats
- Instruction semantics follow Intel SDM revision 093. PMDK API behavior is pinned to version 1.13.1, not asserted to be the latest release.
- Source synthesis only; no persistent-memory device, power-cut experiment or latency measurement.