通常,缓存行是 64B,但非易失性内存的原子性是 8B。
例如:
x[1]=100;
x[2]=100;
clflush(x);
Run Code Online (Sandbox Code Playgroud)
x缓存行对齐,并且最初设置为0。
系统崩溃 clflush();
是否有可能x[1]=0,x[2]=100重新启动后?
当使用像 Intel optane DCPMM 这样的持久内存时,如果在执行 movnt 指令时系统崩溃(断电),是否可以在重新启动后看到部分结果?
为了:
movntix86 保证原子用于其他目的?movntdq/movntps不保证原子性,但实际上可能在支持持久内存的 CPU 上。vmovntdq/vmovntpsvmovntdq/vmovntps全线商店MOVDIR64B在支持它和 DC-PM 的未来 CPU 上保证了 64 字节写入原子性。例如Sapphire Rapids Xeon / Tiger Lake / Tremont。movntpd假定与 相同movntps。
相关问题: