When using persistent memory like Intel optane DCPMM, is it possible to see partial result after reboot if system crash(power outage) in execution of movnt instruction?
For:
- 4 or 8 byte
movnti
which x86 guarantees atomic for other purposes? - 16-byte SSE
movntdq
/movntps
which aren't guaranteed atomic but which in practice probably are on CPUs supporting persistent memory. - 32-byte AVX
vmovntdq
/vmovntps
- 64-byte AVX512
vmovntdq
/vmovntps
full-line stores - bonus question:
MOVDIR64B
which has guaranteed 64-byte write atomicity, on future CPUs that support it and DC-PM. e.g. Sapphire Rapids Xeon / Tiger Lake / Tremont.
movntpd
is assumed to be identical to movntps
.
Related questions:
clflush
itself apparently being atomic, it's still true that it doesn't give any guarantee of gluing together two separate stores into one atomic persistence; one could still commit to persistence before clflush, and then the system crashes. So my commentary on that linked question (which this is a followup to) is still somewhat accurate and relevant: it doesn't work like that when the goal is to atomically write stuff to persistent storage. – Farce