当前位置: X-MOL 学术arXiv.cs.DC › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Scalable Range Locks for Scalable Address Spaces and Beyond
arXiv - CS - Distributed, Parallel, and Cluster Computing Pub Date : 2020-06-22 , DOI: arxiv-2006.12144
Alex Kogan, Dave Dice, Shady Issa

Range locks are a synchronization construct designed to provide concurrent access to multiple threads (or processes) to disjoint parts of a shared resource. Originally conceived in the file system context, range locks are gaining increasing interest in the Linux kernel community seeking to alleviate bottlenecks in the virtual memory management subsystem. The existing implementation of range locks in the kernel, however, uses an internal spin lock to protect the underlying tree structure that keeps track of acquired and requested ranges. This spin lock becomes a point of contention on its own when the range lock is frequently acquired. Furthermore, where and exactly how specific (refined) ranges can be locked remains an open question. In this paper, we make two independent, but related contributions. First, we propose an alternative approach for building range locks based on linked lists. The lists are easy to maintain in a lock-less fashion, and in fact, our range locks do not use any internal locks in the common case. Second, we show how the range of the lock can be refined in the mprotect operation through a speculative mechanism. This refinement, in turn, allows concurrent execution of mprotect operations on non-overlapping memory regions. We implement our new algorithms and demonstrate their effectiveness in user-space and kernel-space, achieving up to 9$\times$ speedup compared to the stock version of the Linux kernel. Beyond the virtual memory management subsystem, we discuss other applications of range locks in parallel software. As a concrete example, we show how range locks can be used to facilitate the design of scalable concurrent data structures, such as skip lists.

中文翻译:

用于可扩展地址空间及其他范围的可扩展范围锁

范围锁是一种同步构造,旨在为多个线程(或进程)提供对共享资源不相交部分的并发访问。最初是在文件系统上下文中构思的,范围锁在 Linux 内核社区中越来越受到关注,以寻求缓解虚拟内存管理子系统中的瓶颈。然而,内核中范围锁的现有实现使用内部自旋锁来保护跟踪获取和请求范围的底层树结构。当频繁获取范围锁时,此自旋锁本身就会成为一个争用点。此外,在何处以及如何锁定特定(细化)范围仍然是一个悬而未决的问题。在本文中,我们做出了两个独立但相关的贡献。第一的,我们提出了一种基于链表构建范围锁的替代方法。列表很容易以无锁方式维护,事实上,我们的范围锁在常见情况下不使用任何内部锁。其次,我们展示了如何通过推测机制在 mprotect 操作中细化锁的范围。反过来,这种改进允许在非重叠内存区域上并发执行 mprotect 操作。我们实现了我们的新算法并证明了它们在用户空间和内核空间中的有效性,与 Linux 内核的股票版本相比,实现了高达 9$\times$ 的加速。除了虚拟内存管理子系统,我们还讨论了并行软件中范围锁的其他应用。作为一个具体的例子,
更新日期:2020-06-23
down
wechat
bug