高并发双向链表
Highly-Concurrent Doubly-Linked Lists
摘要:
随着文件系统越来越多地被部署在具有许多核和多千兆字节存储器的越来越大的系统上,缩放文件系统的内部数据结构变得更加重要和紧迫。双向链表是文件系统中一种简单且非常常用的数据结构,但它对多线程使用不是很友好。虽然列表的特殊情况,如队列和堆栈,有无锁版本,可相当好地扩展,但一般形式的双向链表没有提供这样的解决方案。使用互斥体序列化所有操作仍然是维护双向链表的实际方法。这严重限制了列表的可伸缩性,开发人员必须求助于临时解决方案,包括使用多个较小的列表(带有单独的锁),并处理由此产生的系统复杂性。在本文中,我们提出了一种方法来建立高并发数据结构,特别关注的实现高并发双向链表。被称为“高级双向链表”或简称“adlist”,我们的列表允许在任何方向上迭代,并在非重叠节点上并行执行插入/删除操作。具有公共节点的操作被序列化,以便始终向调用者呈现本地一致的视图。adlist节点需要额外的8字节空间来保存同步信息。Data Domain文件系统广泛使用了adlist,从而在不牺牲简单性的情况下大幅扩展了系统。
英文摘要:
As file systems are increasingly being deployed on ever larger systems with many cores and multi-gigabytes of memory, scaling the internal data structures of file systems has taken greater importance and urgency. A doubly-linked list is a simple and very commonly used data structure in file systems but it is not very friendly to multi-threaded use. While special cases of lists, such as queues and stacks, have lock-free versions that scale reasonably well, the general form of a doubly-linked list offers no such solution. Using a mutex to serialize all operations remains the de-facto method of maintaining a doubly linked list. This severely limits the scalability of the list and developers must resort to ad-hoc workarounds that involve using multiple smaller lists (with individual locks) and deal with the resulting complexity of the system. In this paper, we present an approach to building highly concurrent data structures, with special focus on the implementation of highly concurrent doubly-linked lists. Dubbed "advanced doubly-linked list" or "adlist" for short, our list allows iteration in any direction, and insert/delete operations over non-overlapping nodes to execute in parallel. Operations with common nodes get serialized so as to always present a locally consistent view to the callers. An adlist node needs an additional 8 bytes of space for keeping synchronization information. The Data Domain File System makes extensive use of adlists which has allowed for significant scaling of the system without sacrificing simplicity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。