Non-volatile random access memory (NVRAM) offers byte-addressable persistence at speeds comparable to DRAM. However, with caches remaining volatile, automatic cache evictions can reorder updates to memory, potentially leaving persistent memory in an inconsistent state upon a system crash. Flush and fence instructions can be used to force ordering among updates, but are expensive. This has motivated significant work studying how to write correct and efficient persistent programs for NVRAM. In this paper, we present FliT, a C++ library that facilitates writing efficient persistent code. Using the library's default mode makes any linearizable data structure durable with minimal changes to the code. FliT avoids many redundant flush instructions by using a novel algorithm to track dirty cache lines. The FliT library also allows for extra optimizations, but achieves good performance even in its default setting. To describe the FliT library's capabilities and guarantees, we define a persistent programming interface, called the P-V Interface, which FliT implements. The P-V Interface captures the expected behavior of code in which some instructions' effects are persisted and some are not. We show that the interface captures the desired semantics of many practical algorithms in the literature. We apply the FliT library to four different persistent data structures, and show that across several workloads, persistence implementations, and data structure sizes, the FliT library always improves operation throughput, by at least $2.1\times$ over a naive implementation in all but one workload.
翻译:非挥发性随机存取存储( NRRAM) 提供与 DRAM 相近的速度的字节可处理的耐久性。 然而, 缓存自动迁移可以随着缓存状态的波动而重新排序更新记忆, 在系统崩溃时可能会留下不一致性的内存。 平流和栅栏指示可以用于强制在系统崩溃中排序, 但成本很高 。 这促使大量研究如何为 NURRAM 编写正确和有效的持久程序。 在本文中, 我们展示了一个有助于写入高效持久性代码的 C++ 库FliT 。 使用图书馆的默认模式, 使得任何可线性的数据结构可以与代码最小的修改相容。 FliT 避免许多多余的冲刷指令, 使用新算法来跟踪脏取脏取的缓存行踪迹行踪。 FliT 库库库的运行方式总是通过默认性数据结构来显示, 我们通过 Ftimeal 格式的操作将一个数据库的运行方式和 Ftreal 格式用于一个不同的数据结构。