In the last decade, academic and industrial researchers have focused on persistent memory because of the development of the first practical product, Intel Optane. One of the main challenges of persistent memory programming is to guarantee consistent durability over separate memory addresses, and Wang et al. proposed a persistent multi-word compare-and-swap (PMwCAS) algorithm to solve this problem. However, their algorithm contains redundant compare-and-swap (CAS) and cache flush instructions and does not achieve sufficient performance on many-core CPUs. This paper proposes a new algorithm to improve performance on many-core CPUs by removing useless CAS/flush instructions from PMwCAS operations. We also exclude dirty flags, which help ensure consistent durability in the original algorithm, from our algorithm using PMwCAS descriptors as write-ahead logs. Experimental results show that the proposed method is up to ten times faster than the original algorithm and suggests several productive uses of PMwCAS operations.
翻译:过去十年,随着首款实用产品Intel Optane的问世,学术界与工业界研究者聚焦于持久内存。持久内存编程的主要挑战之一是如何确保跨独立内存地址的一致性持久化。Wang等人提出了持久化多字比较并交换(PMwCAS)算法解决该问题,但其算法包含冗余的比较并交换(CAS)和缓存冲刷指令,在多核CPU上无法达到理想性能。本文提出一种新算法,通过移除PMwCAS操作中无用的CAS/冲刷指令来提升多核CPU性能。此外,我们摒弃了原始算法中用于保证一致性持久化的脏标志位,转而采用PMwCAS描述符作为预写日志。实验结果表明,本方法比原始算法快至多十倍,并揭示了PMwCAS操作的多种高效应用场景。