Lightning-Speed Futexes
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
Lightning-Speed Futexes Jean-Pierre Lozi Julia Lawall Inria Paris, France
1
Mainline Ticket Queue (a) intel-104 (b) intel-192 (c) amd-256 160 100 40 80 50 20 02 36 72 104 02 66 132192 02 88 176256 (d) amd-512 (e) arm-80 300 (f) arm-256 400 40 150 200 20 02 176 352512 02 28 54 80 02 88 176256 Threads Threads Threads
Time (µs)
In the Linux kernel, the futex primitive lets one or several threads sleep until another thread wakes them up. Futexes can be used to implement barriers, in which a futex wake-all is used to release all waiting threads. A wake-all is performed serially: the waker first waits on the lock that protects the list of sleeping threads, behind the threads it is about to wake, then walks a list of threads to collect the threads, and finally wakes them one at a time. We propose an approach that improves the performance of all three steps. Our approach places an abort gate in front of the lock, an admission stage that allows the waker to abort, in constant time, the lock acquisitions queued ahead of it; the waker then detaches the full set of waiters in one step instead of collecting them one by one; and finally it parallelizes the wake-ups by recruiting each woken thread to wake further threads. We implement our approach in the futex subsystem of Linux 6.19. On six Intel, AMD, and ARM servers, our approach speeds up the barrier-intensive NAS kernels by 1.3× to 1.9× on geometric mean, depending on the input class, and 45 barrier-heavy applications by 2.1× on geometric mean, with peak speedups of 4.4× and 6.2×.
Time (µs)
arXiv:2612.03917v1 [cs.OS] 2 Dec 2026
Abstract
Figure 1. Time per pthread barrier: mainline Linux 6.19 against our approach’s two variants, on six machines. Numbers in the machine names indicate the number of CPUs (hardware threads).
spin duration is a heuristic, and no static setting of it performs well across subscription levels [22]. Less attention has been paid to understanding the costs of sleeping and waking threads, in particular in the wake-all case. The futex wake-all path has kept its original structure since futexes were introduced in 2002 [13]: it wakes the waiting threads one at a time. The machines it runs on, meanwhile, have grown from a few cores to hundreds of hardware threads. The cost of a wake-all grows with the number of threads to wake; negligible two decades ago, it is becoming a bottleneck on the large multicores of today, and it will keep growing with core counts. Figure 1 shows this cost on a variety of x86 and ARM machines (Figure 6b), where a set of threads repetitively cross barriers, with no work between crossings. In this scenario, the time per barrier increases with the number of threads, from two threads to a full machine, by a factor of 11 to 63 depending on the machine. Studying the Linux kernel futex wake-all implementation reveals two main sources of overhead. First, as multiple threads may perform futex operations concurrently, the waker must acquire a lock associated with the kernel-level structure recording the set of waiting threads. In this, the waker competes with threads that are trying to wait on the futex, and the waker is typically behind them, thus incurring a delay that is linear in the number of those threads. Second, the waker must collect the threads to wake, and then prepare them for wakeup, i.e., select a destination CPU for each thread and add the thread to the corresponding
Introduction
A futex is a user-level synchronization primitive that allows a waiter thread to sleep while waiting for an event, and a waker thread to wake one or more waiters when the event occurs. Common use cases include a waker waking a single waiter (wake-1), in the implementation of a lock, and a waker waking all waiters (wake-all), in the implementation of a barrier. Because causing a thread to sleep or wake requires direct interaction with the OS thread scheduler, the implementation of a futex straddles the user-kernel boundary, with a counter, representing the futex state, being maintained at user level, and the set of waiting threads being maintained in the kernel. When a futex is used to implement a lock or barrier, it implies that waiters for the lock or barrier may sleep. Sleeping waiters incur a delay on every wakeup, but resist performance collapse in the case of oversubscription, as a sleeping waiter cannot preempt the thread on the critical path. On the other hand, spinning waiters can react quickly to a wake, but are vulnerable to preemption, or to preempting the waker, both of which can severely degrade performance. These risks have led to variants like spin-then-park, in which a waiter spins for a bounded amount of time before sleeping; the 1
Jean-Pierre Lozi and Julia Lawall
runqueue, incurring an overhead linear in the number of waiting threads. To address these overheads, we propose a redesign of the futex wake-all path. To address the need for the waker to wait behind threads that no longer need to wait, we move the acquisition of the lock inside an abort gate: an admission stage in front of the lock, allowing a wake-all to abort every acquisition queued ahead of its own, in constant time. Indeed, in the wake-all case, as soon as the waker invokes futex wake at the user level, the remaining pending waiters no longer need to wait on the futex, and thus no longer need to acquire the lock. Aborting these waiters’ lock acquisitions allows the waker to take the lock immediately, and thus immediately access the threads that are already sleeping on the futex. To address the need to pass over the list of waiters to collect the relevant ones, we use a flag to detect the common case where all waiters are waiting for the same futex, making it possible to collect them all in a single operation. To address the linear wakeup of the sleeping threads, we introduce a parallel wakeup, in which sleeping threads are recruited to wake up other threads after the sleeping threads themselves have been woken up. This forms a tree of wakers, giving a log-time complexity. We evaluate the performance of barriers on OpenMP applications, as the OpenMP framework systematically introduces barriers to implement parallel regions. On six Intel, AMD, and ARM servers, our changes speed up the barrier-intensive NAS kernels by 1.3× to 1.9× on geometric mean, depending on the input class, and 45 barrier-heavy applications from Rodinia, GAPBS, oneDNN, and five HPC proxy applications by 2.1× on geometric mean, with peaks of 4.4× and 6.2×. On applications with a lower rate of barriers, performance is unchanged. Sleeping barriers under our approach reach 78% of the performance of spinning waiters, while remaining more robust to oversubscription. In summary, our main contributions are:
AMD, and ARM servers, our approach reduces the time per barrier of our microbenchmark (Figure 1) by up to 8.7× when using all hardware threads, speeds up 45 barrier-heavy applications by 2.1× on geometric mean and the barrier-intensive NAS kernels by up to 4.4×, and does not degrade futex workloads that never perform a wake-all. The rest of this paper is organized as follows. § 2 presents background on futexes, barriers, and the cost of wake-all. § 3 presents our approach and § 4 its implementation in the Linux kernel. § 5 evaluates our approach on microbenchmarks and applications. Finally, § 6 presents related work and § 7 concludes.
2
Background
This section describes how the Linux kernel implements futexes and the trade-off between spinning and blocking for barrier waiters. It then breaks down the cost of a wake-all into the three sequential steps that our approach addresses. 2.1
Futexes in the Linux kernel
A futex is represented at user level by a 32-bit word, which is used to store information necessary to implement the fast path of a lock or barrier operation at the user level. Waiting on a futex and waking the tasks waiting on a futex are carried out at the kernel level. For this, the kernel has to maintain the list of tasks waiting on each futex. As the kernel has no a priori knowledge of the number of futexes, but needs to be able to access rapidly the set of waiting tasks for a given futex, it stores the tasks waiting on a futex in a hash table, indexed by a hash of the futex’s user-level address. While the use of a hash table provides efficient access to the relevant hash bucket, it introduces the possibility of collisions, when multiple futex addresses hash to the same hash bucket. Each waiter is thus represented by a small record, allocated on the waiter’s kernel stack, that carries a key, obtained from the hash of the futex’s user-level address, identifying its futex, and a bitset that can restrict which wake-ups it accepts. Since Linux 6.17 [33], each process has a private hash table of buckets for its process-private futexes. As the process creates threads, this hash table is replaced by a new one of size the next power of two, and any threads waiting in the existing hash table are moved to the new one. A global hash table is used for futexes that are shared between processes.
• We introduce abort gates, which augment the lock protecting the kernel’s waiter lists. These gates enable a wake-all to abort, in constant time, the queued lock acquisitions of the waiters that the wake-all is about to wake, whose waits have become unnecessary. We present two gate variants that provide this operation without the complexity of general abortable locks [32]: ticket and queue; the latter trades memory for performance. • We introduce a parallel wake-up mechanism for futexes: the threads first woken by a wake-all wake the remaining sleeping threads in turn, which reduces the wake-up step’s critical path from linear to logarithmic in the number of waiters. A constant-time bulk detach of the waiter list removes the linear collection step. • We implement both mechanisms in Linux 6.19, preserving the futex interface and semantics. On six Intel,
Waiting. FUTEX_WAIT takes the futex address and a callerchosen value, normally the one the caller last read from the futex word. The kernel acquires the lock protecting the associated hash bucket, rereads the futex word, and, if the current value differs from the provided caller-chosen value, returns immediately to user space: the word has changed since the caller read it, so the wake the caller means to sleep for may already have been issued, and sleeping at this point could 2
Lightning-Speed Futexes
Time (µs)
Waking. FUTEX_WAKE takes the futex address and a count 𝑛 of waiters to wake. The kernel acquires the bucket lock, walks the list to collect the matching waiters, up to 𝑛 of them, removes them from the bucket’s list, releases the lock, and wakes the collected threads one by one. Linux also provides requeue, used by condition variables: a broadcast moves all but one waiter from the condition variable’s futex to the mutex’s futex instead of waking them, so that they wake one at a time as the mutex is released; a requeue locks the two buckets at once. A barrier is the wake-all case, 𝑛 = INT_MAX: in glibc’s pthread_barrier_wait, the last thread to arrive updates the barrier word and then issues a single wake-all for the waiters of the current phase. Because the word is updated before the wake-all is issued, any concurrent FUTEX_WAIT that has not yet enqueued its waiter record when the wakeall runs will reread the word, find it changed, and return to user space rather than sleep; our approach’s abort gate relies on this property (§ 3.1). 2.2
Figure 2. Time per pthread barrier in the microbenchmark when one thread does 1 ms of work between barriers, allowing the other waiting threads to sleep.
results are shown in Figure 1. As the number of threads increases, the Linux mainline’s time per barrier grows by a factor of 11 to 63, depending on the machine, while for our approach, the time grows by a factor of 4 to 16. Figure 2 repeats the experiment with one change: a thread works for 1 ms between each barrier, and as it is the last to arrive at each barrier, it always performs the wake-all operation. While this thread waits, the other threads have time to fall asleep, and every wake-all must wake 𝑛 − 1 sleeping threads. The reported time per barrier excludes the 1 ms of work between each barrier. In this regime, the abort gate (§ 3.1) does not help: the waiters enqueue themselves in the bucket’s waiter list and sleep long before the wake-all, so the waker finds no queued acquisitions to cancel. The whole cost is thus the serial wake-up of the 𝑛 − 1 sleepers. Mainline’s growth reaches a factor of 33 to 167, depending on the machine, against 8 to 22 for our approach. Figure 3 (a) breaks down the waker’s timeline, revealing three costs:
Spinning and blocking barriers
Sleeping in the kernel is not the only way to wait: a barrier can also make its waiters spin in user space. A release then costs a single store to the barrier word and no kernel work, but every spinning waiter occupies a CPU, and under oversubscription a spinner can preempt a thread on the critical path, severely degrading performance (§ 5.7). Sleeping waiters are robust to oversubscription, but a release then pays the cost of the kernel wake path, which grows with the number of waiters to wake. OpenMP runtimes compromise: a waiter spins for a configurable time before it sleeps (OMP_WAIT_POLICY, KMP_BLOCKTIME). The default budgets are essentially arbitrary; the best ones depend on the workload and the machine, and recent work shows that no static budget suits all situations [22]. Our approach takes the other route: rather than tune when to block, it makes blocking cheap. 2.3
Mainline Ticket Queue (a) intel-104 (b) intel-192 (c) amd-256 160 40 100 80 20 50 02 36 72 104 02 66 132192 02 88 176256 (d) amd-512 (e) arm-80 (f) arm-256 400 300 40 200 150 20 02 176 352512 02 28 54 80 02 88 176256 Threads Threads Threads
Time (µs)
mean never being woken. On the other hand, if the two values are still the same, the kernel enqueues the waiter’s record and puts the caller to sleep. A waiter that gives up, on a timeout or a signal, reacquires the bucket lock and removes itself from the list. Because the record lives on the waiter’s stack, it vanishes when the waiter returns. The record is therefore only ever accessed under the bucket lock; the waker’s last access to a record clears the record’s pointer to its bucket, and the woken waiter waits for that final store before it returns.
1. The waker must acquire the bucket lock. As the lock is FIFO, it waits behind any earlier waiter not yet holding the lock, and behind any other user of the bucket in the same situation. 2. The walk of the waiter list that collects the threads to wake runs under the bucket lock and is linear in the number of waiters the bucket holds. 3. The waker then wakes the collected threads sequentially, selecting a destination CPU for each thread, and making the thread runnable on that CPU.
The cost of wake-all
Cost 1 grows with the number of waiters racing the waker for the lock, cost 2 with the number of waiters in the bucket, and cost 3 with the number of threads to wake. Our approach’s abort gate removes cost 1: the waker aborts the queued acquisitions instead of waiting behind them on the bucket lock, and reaches the bucket’s waiter list in constant time (Figure 3 (b), § 3.1). We address the two other costs
To study the cost of wake-all, we have developed a microbenchmark. It runs 2 to 𝑛 threads, where 𝑛 is the number of hardware threads on the machine (Figure 6b). All threads repeatedly cross pthread barriers, all of which are mapped to the same hash bucket, and the threads perform no other work: the cost is thus dominated by the bucket lock. The 3
Jean-Pierre Lozi and Julia Lawall (a) Linux
Lock queue
find the word changed and return to user space. Aborting through an abort gate is safe even for a waiter whose futex word has not changed, such as a waiter of another futex that hashes to the same bucket, because an aborted waiter revalidates the word and, if it must still wait, retries.
Walk w w w w w w
𝑛 − 1 serial wake-ups (b) Abort gate
Walk w w w w w w Abort
(c) our approach Abort
w w w w w w Detach
Woken threads help
Rationale. Placing an abort gate in front of the kernel’s qspinlock, rather than replacing the qspinlock itself with an abortable lock [31, 32], has three benefits. First, to limit any potential overhead of the gate to the operations where the gate may be helpful, only an enqueue of a waiter and a wake-all go through the gate; every other operation acquires the qspinlock directly and runs the unmodified code. Second, to further avoid incurring overhead on wait operations that are not subsequently targeted by a wake-all, the gate can be activated and deactivated per bucket, and only the buckets that have recently performed a wake-all pay the gate’s potential overhead (§ 5.2). Third, to avoid waiter starvation, an aborted acquisition retries on the qspinlock, where no wake-all can abort it, so an acquisition is aborted at most once, and repeated wake-alls cannot starve a waiter.
time
Figure 3. A wake-all waking 𝑛 − 1 sleeping waiters, as when the last of 𝑛 threads releases a barrier (waker’s timeline). (a) Linux: the waker queues on the bucket lock behind the pending insertions of the very waiters it is about to wake, walks the list, and performs 𝑛 − 1 wake-ups (denoted ‘w’), all sequentially. (b) The abort gate (§ 3.1) aborts the queued acquisitions in constant time, but the wake-ups remain serial. (c) our approach detaches the waiter set in constant time and recruits wakees to wake the rest (§ 3.2).
by replacing the walk (cost 2) with a constant-time bulk detach and parallelizing the wake-ups (cost 3) by recruiting the woken threads to wake other threads (Figure 3 (c), § 3.2).
3
Design. The gate is an admission stage in front of the qspinlock (Listing 1): Threads wait their turn in the gate’s queue, and are admitted to the qspinlock one at a time; a wake-all can abort every thread waiting in the queue. A thread acquiring the bucket lock first attempts to obtain the qspinlock directly, with a single compare-and-swap that succeeds when the qspinlock is free (line 2): an uncontended acquisition thus takes the same fast path as in mainline. On failure, the thread waits for its turn in the queue (line 4). A waiter that a wake-all aborts leaves the gate without holding the lock (line 5); it revalidates the futex word and returns to user space, or acquires the qspinlock directly when the wakeall was for another futex sharing the bucket (not shown in the listing). A thread whose turn arrives acquires the qspinlock (line 6) and leaves the queue (line 7) before running its critical section, so the queue’s next handover overlaps the critical section; the gate can even improve performance when the queue’s handover is slower than the qspinlock’s (§ 5.2). A wake-all aborts the queued acquisitions first, in constant time, and then acquires the qspinlock like a waiter. Finally, a bucket’s gate is activated by the bucket’s first bulk detach (§ 3.2), and it is deactivated, aborting the queued waiters, by a waiter that enters it more than 𝜆𝑁 cpu contended entries after the bucket’s most recent bulk detach; 𝑁 cpu is the machine’s number of CPUs and 𝜆, the linger factor, defaults to four.
Our Approach
Our approach addresses the costs of § 2.3 with three cooperating mechanisms. To avoid the need for the waker to wait behind the threads that it is trying to wake up, our approach introduces an abort gate on the bucket lock, allowing a wakeall to abort the acquisition attempts of all previous waiters. To avoid the linear-time collection of waiters, our approach keeps track of whether all waiters have the same key and bitset, and detaches them from the bucket in constant time on a compatible wake-all in this case. To shorten the linear wakeup of waiters, our approach recruits woken threads to wake other sleeping waiters, in parallel, thus reducing the cost from linear to logarithmic. These changes preserve the futex interface and semantics. Priority inheritance, requeue, io_uring, and partial wakes run the unmodified code. Furthermore, only the buckets of the per-process private tables use the new mechanisms. The global table, which serves the futexes shared between processes, is left unmodified. 3.1
Abort gates
We design abort gates that wrap queued wait operations, making it possible for wake-all operations to abort them, in constant time. An abort gate removes cost 1 of § 2.3, the cost that dominates Figure 1: a wake-all queues on the bucket lock behind up to 𝑛 − 1 acquisitions by the very waiters it is about to wake. These acquisitions serve no purpose: the waiters still queued on the lock never need to insert themselves into the waiter list, because the futex word has already changed (§ 2.1), so each of them, once served, would
3.1.1 The ticket gate: Rationale. The gate must allow a wake-all operation to stop all queued waiters in constant time. A design based on keeping waiters in a linked list, such as Linux’s qspinlock, cannot achieve this goal. In such a design, each waiter spins on its own list node, and stops spinning when its predecessor writes to that node. Aborting all waiters would therefore mean (i) walking the list and 4
Lightning-Speed Futexes 1 struct ticket_lock { 2 atomic64_t next_ticket ; /* next to hand out */
writing to every node to signal threads that they have been aborted or (ii) letting all waiters remove themselves from the list concurrently, as would be allowed by existing generic abortable lock designs [31, 32]. However, (i) costs 𝑂 (𝑛) cache misses, similarly to Linux’s design without aborts, where 𝑛 threads acquire the lock and release it instantly, and (ii) relies on complex algorithms that are designed to let waiters leave the queue independently, and produces a costly storm of competing concurrent atomic operations when all previous waiters are aborted as in our use case (§ 6). The ticket gate is instead based on a ticket lock, which has no list. In a ticket lock, waiters take numbered tickets from a counter, and they all spin on a second counter, serving, which holds the number of the ticket being served. To abort the waiters, it is enough to move serving past their tickets: each waiter sees that serving has passed the waiter’s ticket and stops spinning by itself.
3 4
6 /* Spin until ticket t is served or passed . */ 7 bool wait_for ( struct ticket_lock *l , u64 t ) { 8 while ( true ) {
7 8 9 }
u64 s = smp_load_acquire (& l - > serving ); if ( s == t ) return true ; if ( ticket_after (s , t )) return false ; cpu_relax ();
9 10 11 12 13
}
14 } 15 /* Raise skip_to to t ; it only increases . */ 16 void skip_to_max ( struct ticket_lock *l , u64 t ) { 17 u64 s = atomic64_read (& l - > skip_to ); 18 19 20
while ( ticket_after (t , s )) if ( try_cmpxchg (& l - > skip_to , &s , t )) return ;
21 } 22 /* Waiter side : acquire , or fail if aborted . */ 23 bool cond_lock ( struct ticket_lock *l , u64 * t ) { 24 * t = fetch_inc (& l - > next_ticket ); 25 return wait_for (l , * t ); 26 } 27 /* Wake - all : acquire , aborting all earlier tickets . */ 28 bool abort_and_lock ( struct ticket_lock *l , u64 *t) { 29 * t = fetch_inc (& l - > next_ticket ); 30 skip_to_max (l , * t ); 31 return wait_for (l , * t ); /* false : aborted */ 32 } 33 void unlock ( struct ticket_lock *l , u64 t ) { 34 35 36 37 38 }
u64 next = t + 1; u64 s = atomic64_read (& l - > skip_to ); if ( ticket_after (s , next )) next = s ; smp_store_release (& l - > serving , next );
Listing 2. The ticket gate (simplified). Tickets are 64bit and compared using wrap-around-safe arithmetic; each ticket_lock field is padded to a full cache line (not shown).
3.1.2 The queue gate: Rationale. While ticket-based designs can be efficient on smaller machines [10], they do not scale to machines with many cores. All of ticket’s waiters spin on serving, and serving changes at every handover, so every handover invalidates the copy of serving in the cache of every waiter: the more waiters, the more expensive the handover (§ 5.2). This broadcast is what caused Linux to move from ticket spinlocks to the MCS-based qspinlock, whose waiters spin on private locations [9]. Queue is a version of ticket in which each waiter spins on two locations: its own pool word and skip_to. The pool word plays the role of the private node a qspinlock waiter spins on: a word in a shared pool, associated with the waiter’s ticket, that the releaser writes when the ticket’s turn comes, granting the waiter the lock. Spinning on the word is cheap because it is private. Spinning on skip_to lets the waiter see an abort in constant time, and it is cheap too: unlike serving, skip_to is only updated on an abort.
1 bool waiter_gate_enter ( struct gate * g ) {
4 5 6
/* ticket served */ /* highest abort */
5 };
Design. Alongside the ticket lock’s two counters, the ticket dispenser and serving, Ticket adds a third field, skip_to, in which a wake-all publishes the ticket it has just taken. The next release moves serving directly to skip_to, rather than to the next ticket. This single write aborts every waiter in between, and it serves the wake-all, whose ticket skip_to holds: the wake-all waits for at most one handover, however many waiters it aborted. Listing 2 shows the algorithm. Ticket has three fields (lines 1 to 5): next_ticket, the ticket dispenser; serving, the ticket currently served; and skip_to, the highest ticket published by an abort. wait_for() (lines 6 to 14) spins on serving until it reaches ticket t, which means the acquisition succeeded (line 10), or passes it, which means the acquisition was aborted (line 11). skip_to_max() (lines 15 to 21) raises skip_to to t with a compare-and-swap loop, so skip_to only ever increases. cond_lock(), the waiters’ abortable acquisition, obtains a ticket and waits for it (lines 22 to 26). abort_and_lock(), the wake-all’s acquisition, draws a fresh ticket and publishes it in skip_to, aborting every acquisition with an earlier ticket, then waits for its own ticket (lines 27 to 32). Finally, unlock() (lines 33 to 38) advances serving to t + 1, or to skip_to when it is higher, handing the lock to the next waiter in line or, past the aborted waiters, to the wake-all. 2 3
u64 serving ; atomic64_t skip_to ;
if ( spin_trylock (& g - > qspin )) /* mainline fast path */ return true ; if (! cond_lock (& g - > queue )) return false ; /* aborted by a wake - all */ spin_lock (&g -> qspin ); unlock (&g -> queue ); /* let the next thread advance */ return true ;
Listing 1. The abort gate’s wait path. qspin is the existing qspinlock protecting the bucket; queue is the waiter queue of an abortable lock, ticket or queue. 5
Jean-Pierre Lozi and Julia Lawall
Design. A waiter that holds a ticket spins on the ticket’s pool word. Analogous to a queue lock, a releaser passes the lock to the next waiter by writing to the next ticket’s word. An aborted waiter sees skip_to pass its ticket and frees its word itself; nobody writes to it. The pool is finite while tickets are unlimited, so two acquisitions can map to the same word. A word is claimed with one compare-and-swap, which changes its state from free to published; the previous lock holder changes it to granted when passing the lock. A word can change hands in the middle of a handover, when an abort frees it and a later acquisition claims it. In that case, the previous holder’s compare-and-swap fails, rather than waking the wrong waiter, because the word holds the ticket and bucket of the acquisition that claimed it. The pool must make two kinds of conflicts rare while using a reasonable amount of memory. When two acquisitions map to the same pool word, the later one falls back to spinning on serving and pays ticket’s costs. When the words of two waiters share a cache line, a write to either word invalidates the line in the cache of the waiter spinning on the other: this false sharing is costly. Consider first a pool with as many cache lines as the table has hash buckets: 𝐸 lines, where Linux sizes 𝐸 at four buckets per thread, rounded up to a power of two, so 𝐸 ≥ 4𝑁 cpu at one thread per CPU. We assign the word of ticket 𝑡 of bucket 𝑏 to line (𝑡 + 𝑏) mod 𝐸; within the line, which holds eight 64-bit words, the word is number 𝑏 mod 8. Consecutive tickets of a bucket thus fall in consecutive lines, so the waiters of one barrier instance never conflict. Distinct buckets rarely conflict either: a thread holds a word only while it waits in the queue for the lock, during which preemption is disabled (§ 4), so at most 𝑁 cpu words are live over the 𝐸 lines, and two buckets conflict only if their live words land on the same line at the same time. Such a conflict is also short-lived: the words involved are freed when their waiters are served or aborted, and since every ticket a bucket takes moves its words one line forward, the two buckets meet again only if they keep taking tickets at the same pace. Finally, to make both conflicts rarer, a budget 𝜌 enlarges the pool to 𝜌𝐸 lines, 𝐸 rows of 𝜌 lines each; 𝜌 defaults to four. Ticket 𝑡 of bucket 𝑏 then takes row (𝑡 + 𝑏) mod 𝐸 and, within the row, line 𝑏 mod 𝜌, so two buckets that meet in a row conflict only if their numbers are equal modulo 𝜌. Figure 4 shows a release with a pending abort. Tickets 42 to 44 are queued, and the wake-all holds ticket 44, published in skip_to. The releaser of ticket 41 publishes serving = 44 and grants pool word 44 with one compare-and-swap, taking the word from published to granted (“P→G” in the figure). The aborted waiters 42 and 43 see skip_to pass their tickets (dashed arrows) and free their own words (“P→F”); the release never touches their words. 3.2
24 | 23
63
ticket
2|1
bucket
serving = 41
0
state
skip_to = 44 release: CAS P→G
41 G
42 P
43 P
44 P
owner
P→F
P→F
waker
···
Figure 4. Pool words during a release with a pending abort; “F”, “P”, and “G” are the free, published, and granted states.
the second microbenchmark (Figure 2). On this microbenchmark, where all waiters sleep, parallel wake-ups make our approach up to 8.7× faster than mainline when using all hardware threads. Design. Sleeping waiters do not contend with the waker for the bucket lock, and thus they do not contribute to the cost 1 of § 2.3. Accordingly, we turn our attention to costs 2 and 3, which relate to waiter collection and wake-ups. To address these costs, our approach moves work from the waker, in the critical path, to the waiters, either before they sleep or after they wake up. In both cases, the waiters’ added work is done in parallel, and is done mostly outside of the critical path. For the collection step, the linear scan is induced by the fact that a single bucket of the hash table may contain waiters for multiple futexes. Furthermore, the waker can provide a bitset, further restricting the set of threads to wake, implying the need to check the bitset of each waiter for compatibility. The linear scan is unnecessary, however, if the bucket is known to contain only threads waiting for the same futex, i.e., having the same key, and providing the same bitset. To track this case, we extend the bucket with a flag, indicating whether the set of waiters is empty (HB_ZERO), contains only waiters having the same key and bitset (HB_ALLSAME), or contains waiters that may have different keys or bitsets (HB_DIFFERENT). When all waiters have the same key and bitset, the bucket also records the key and bitset values. The wait path updates this flag for each incoming waiter, according to the waiter’s key and bitset. This represents a small overhead for the waiter, but is outside the critical path. For the wake-up step, the key idea is to distribute the set of waking threads to other threads, who can then perform the wake-up in parallel. These delegate wakers must execute futex code, into which we can interject wake operations. We use the threads that a waker wakes as delegate wakers, since the waker interacts directly with these threads, and thus can pass to them the required information. This strategy furthermore makes it possible to limit the number of delegate wakers to the number that is needed to wake the number of sleeping threads, and thus limit the amount of overhead the delegate wakers incur. A wake-up only designates delegate wakers when the waker wants to wake multiple threads, all of the sleeping
Parallelizing wake-ups
Parallel wake-ups address the case where many waiters obtain the bucket lock and sleep, illustrated, in the extreme, by 6
Lightning-Speed Futexes 1 void futex_wake_up_loop ( struct front * front ) { 2 int i , batch = WAKE_BATCH , top = front - > ctr ; 3 4 5 6 7 8 9 10 11 12 13 14 15
while holding the bucket lock. The waker then releases the bucket lock and passes the array to the waking function. In this function, both the waker and the delegate wakers, once they are identified, iterate over the array using a shared index that is checked and updated locklessly, using atomic operations (Listing 3, line 3). At each step a waker or delegate waker claims a chunk of 𝑁 sleeping threads (we evaluate the impact of the value of 𝑁 in § 5.9). On each wake, until all sleeping threads have been accounted for, the waker passes the array and shared index to the waking thread (Listing 3, line 8), which, after its wake-up, becomes a delegate waker. The array is managed by a reference count, incremented for each delegate waker (Listing 3, line 9). When a waker sees the shared index reach the end of the array, it decrements the reference count. When a waker decrements the reference count to zero, it frees the array (Listing 3, line 15). This approach requires allocating the array in which to hold the waiters. Even if this is done by a waiter, and is thus not in the critical path, we want to avoid the cost of the memory management in the common case where a single thread is waiting for a lock. Accordingly, we introduce a new flag for the first waiter, HB_ONE. The first waiter changes the flag to HB_ONE and records its key and bitset in the bucket, but only adds itself to the linked list. If the next waiter also has the same key and bitset, it sets the flag to HB_ALLSAME, allocates the array, and initializes the first element of the array with the first thread and the second element with itself. The parallel wake is performed in this case. A wake when the flag is HB_ONE uses the original mainline implementation. If a waker does not match the constraints, it falls back to the mainline implementation. If during the collection step the waker finds matching threads but does not wake all waiting threads, then the bucket flag is reset to HB_DIFFERENT. If the collection step finds no matching threads, the current flag still reflects the state of the threads waiting in the bucket, and no change is made.
while (( i= atomic_fetch_add ( batch ,& front - > cur )) < top ) { int end = min ( i + batch , top ); for ( ; i < end ; i ++) { struct futex_q * q = front - > arr [ i ]; if (i * batch < top ) { /* recruit */ q -> towake = front ; atomic_inc (& front - > refcount ); } futex_wake_up ( q ); } } if (! atomic_dec_return (& front - > refcount )) kfree ( front );
16 }
Listing 3. The wake-up function, futex_wake_up_loop().
threads have the same key and bitset (HB_ALLSAME), and all of the sleeping threads should be woken. If any of these constraints is not met, the waker falls back to the mainline’s implementation. If the key or bitset of the waker is not compatible with the information recorded in the bucket, the waker returns immediately; there are no threads to wake and no scan of threads is needed. Otherwise, the waker detaches the complete set of waiters from the bucket and passes them to a wake-up function (Listing 3). This wake-up function not only wakes up threads from the set, it also passes the set to the woken threads (Listing 3, line 8), so that they can also wake threads from the set. Other waits can proceed on the same bucket during these wakes with no interference. Wake-up function. To present the waking function in more detail, we first consider the representation of the set of waiters. The original mainline implementation represents the set of waiters as a doubly linked list. This representation allows constant-time insertion when a waiter arrives, constant-time deletion when a waiter is chosen to be woken up, and can accommodate an unbounded number of sleeping waiters. Such a data structure, however, is not suitable for concurrent access by the delegate wakers. In particular, in order to minimize overhead we do not want to reintroduce linearization by making the delegate wakers take another lock. At the same time, we do not want to lose the benefits of lists for the cases where the use of delegate wakers is not possible. To address these issues, we introduce a second representation of the set of sleeping threads, as an array, used only in the HB_ALLSAME state. The array has as many elements as the number of CPUs, to accommodate the common case of one thread per CPU (as in, e.g., default OpenMP barriers). More waiters than the number of CPUs causes the flag to be reset to HB_DIFFERENT, abandoning the optimization. On a wait, a waiter takes the first empty element in the array, as indicated by a counter stored in the array, and sets this element to point to the waiter’s entry in the list. On a wake in the HB_ALLSAME state, with compatible key and bitset, the waker simply detaches the array and the list from the bucket,
Correctness. The delegate wakers iterate over the detached array without holding the bucket lock, departing from the lifetime rule of § 2.1. Two races follow. First, a thread may be woken by both a delegate waker, and, e.g., a concurrent wake on another futex the thread has been requeued to. Each wake claims the thread with the same compare-and-swap, on the same per-thread field, as mainline’s deferred wake-up lists, so a thread is woken at most once even when one of the wakes runs the unmodified path. Second, a waiter woken by a timeout or a signal, rather than by a futex wake, must remove its record from the bucket’s list, and a wake-all may have detached the list in the meantime. To detect this, each bucket maintains a wake epoch, incremented at every bulk detach, and each waiter records the epoch at enqueue time; both operations occur under the bucket lock. Before removing its record, the waiter takes the bucket lock and compares its recorded epoch to the bucket’s. 7
Jean-Pierre Lozi and Julia Lawall
If they are equal, no detach has happened since the waiter enqueued: its record is still in the bucket’s list, and the waiter unlinks it as in mainline. If they differ, a wake-all has moved the record, with the rest of the list, into a detached array, and the waker or a delegate will wake the waiter through it, or already has. Either way, the record lives on the waiter’s stack, so the waiter must not return while a waker can still reach the record: the waiter sleeps, uninterruptibly, until that wake’s final access clears the record’s bucket pointer, and then returns to user space as woken, as a mainline waiter already does when it is woken before it can remove itself.
4
the performance collapse of user-space spinning when the machine is oversubscribed (§ 5.7)? And (vi) how sensitive are the results to our approach’s parameters (§ 5.9)? Methodology. Our experiments are carried out on Intel, AMD, and ARM servers (Figure 6b). Each microbenchmark measurement is repeated 20 times (§ 5.1, § 5.2, and § 5.4); the measurements of the other experiments are repeated between 3 and 30 times, depending on the configuration’s run time, as detailed in the supplementary material. We report medians throughout. The microbenchmarks report their own timings. Timings for the other experiments are obtained using hyperfine [29]. All experiments pin one thread per hardware thread. For the microbenchmarks, placement is balanced across sockets and L3 domains, and all of a core’s hardware threads are used before the next core. All other tested applications use OpenMP, and thus we use OMP_PLACES=threads and OMP_PROC_BIND=TRUE. We use the TEO cpuidle governor [37] on intel-1041 and the default menu governor on the other machines. Our approach runs with a wake batch 𝑁 = 4, a linger factor 𝜆 = 4, and a pool budget 𝜌 = 4 cache lines; the specific values of these parameters have little impact (§ 5.9).
Implementation
We have implemented our approach in Linux 6.19. The patch adds 1,284 lines of code. Of these lines, 738 are in the futex subsystem (kernel/futex/), the two gates are self-contained headers of 94 (ticket) and 334 (queue) lines, and the remaining lines mostly concern build options. A thread stores the ticket of its acquisition in a per-CPU slot; there are two slots per CPU because a requeue holds two bucket locks at once (§ 2.1). Preemption is disabled from the claim of a ticket to the release of the qspinlock, as mainline does across the bucket lock’s critical section. An in-flight acquisition thus never leaves its CPU, so two slots suffice and queue has at most one live pool word per CPU (§ 3.1.2). Our approach’s wait loops use smp_cond_load_ acquire(). On x86, the loop spins, reevaluating its condition at every iteration. On ARM, it halts the core with the WFE (wait for event) instruction; the core reevaluates only when an event arrives, such as a write to the monitored cache line. Ticket’s aborts are writes to serving, the line its waiters monitor. Queue’s waiters monitor their private pool words, so after an abort writes skip_to, the waker executes an SEV (send event) instruction, waking every parked core. While evaluating our approach, we found an allocation storm in mainline’s private-table resizing: when a resize is in flight, every thread creation allocates and frees a full-size table. We wrote a fix; every kernel we evaluate includes it, and we will send it to the futex maintainers. Only queue was noticeably affected: due to its pool, the storm allocates and frees significantly more memory.
5.1
The two barrier benchmarks were presented with Figure 1 and Figure 2. From two threads to all the hardware threads of each machine, mainline’s time per barrier grows by a factor of 11 to 63 in Figure 1 and of 33 to 167 in Figure 2; our approach brings these factors down to 4 to 16 and 9 to 22. The two benchmarks also let us compare the ticket and queue gates. In Figure 1, where the threads rarely have time to sleep and the gate itself is the bottleneck, the outcome varies across machines: queue is ahead of ticket by 91% on amd-256, by 33% on arm-80, and by 27% on arm-256, and the two are within 4% of each other elsewhere; § 5.2 examines this architecture dependence. In Figure 2, where every release wakes sleeping threads and the parallel wake dominates the cost, the choice of gate makes little difference: with all hardware threads in use, the two gates are within 8% of each other on every machine. 5.2
5
Barrier microbenchmarks
Overhead of the abort gates
We evaluate the two gates with perf bench futex hash, which stresses the futex hash table; we set it up so that every thread hashes to one bucket, putting all the load on a single bucket lock. Each thread repeatedly issues futex_wait calls that fail their check of the futex word and return without sleeping. The benchmark issues no wake-alls, so a gate activated on demand would stay inactive; we therefore build the gate as always active. This represents a worst
Evaluation
We evaluate our approach with three microbenchmarks and a wide range of applications that use barriers, on the six machines of Figure 6b. The evaluation answers six questions: (i) how much faster does our approach make barriers (§ 5.1), and do the gains carry over to applications (§ 5.3, § 5.8)? (ii) how does ticket perform relative to queue (§ 5.1, § 5.2, § 5.3)? (iii) do alternative approaches, such as a faster bucket lock or a user-level tree of wake-ones, achieve the same gains (§ 5.4, § 5.5)? (iv) how much do the abort gate and the parallel wake each contribute (§ 5.6)? (v) does our approach avoid
1We have observed that intel-104 and other tested Intel Ice Lake machines
have a very long exit latency from the lowest idle state, C6. The mainline developers suggest to use TEO for such machines. 8
Lightning-Speed Futexes
M ops/s
M ops/s
Mainline Raw ticket (a) intel-104
Ticket Raw queue (b) intel-192
Queue
B and 1.3× at class C on the same six kernels, because larger inputs put more computation between barriers. Larger machines see higher speedups, however: at class C, on geometric mean over all nine kernels, intel-192 reaches speedup 1.19 against 1.03 for intel-104, and arm-256 reaches 1.14 against 1.03 for arm-80. We report classes A to D; the run time of the larger class E is prohibitive at our repetition counts. Since the two gates are equivalent within a few percent, and queue is generally ahead when they differ, the rest of the evaluation reports queue only, to save space. Full results are available in the supplementary material.
(c) amd-256
6 8 3 4 60 10401 100 19201 128 256 (d) amd-512 (e) arm-80 (f) arm-256 2 2 4 1 1 2 01 0 288 512 1 40 80 01 130 256 Threads Threads Threads 4 2 01
5.4
A natural question is whether a faster hash-bucket lock alone would be sufficient to improve barrier performance. To answer it, we replace the bucket lock with a TCLock [15], a state-of-the-art kernel lock that uses delegation [24, 30] to improve performance. The TCLock implementation supports only x86, so Figure 7 repeats the barrier benchmark of Figure 1 on the four x86 machines. The faster lock, somewhat counterintuitively, makes the barrier slower: with all hardware threads in use, the TCLock is behind mainline by 1.3× to 1.8×, depending on the machine, and far behind queue. The reason is that a waiter commits to sleeping only when it rereads the futex word under the bucket lock (§ 2.1). A waiter that obtains the lock after the last thread has updated the word sees the update and returns to user space without sleeping, no matter how early it began acquiring the lock. A faster lock serves more waiters before the update, and thus, in our traces, far more threads sleep under the TCLock than under mainline’s qspinlock. Each extra sleeper adds one wake-up to the serial wake path. The same effect explains why mainline’s time per barrier plateaus at high thread counts on intel-192 in both Figure 7 and Figure 1. A thread sleeps only if it obtains the qspinlock before the last thread updates the word. At low thread counts, the lock serves every waiter in time, so each added thread adds a sleeper and the serial wake-up grows. At high thread counts, the lock can no longer keep up: the extra threads are served after the update and do not sleep, so the number of sleepers, and with it the time per barrier, stops growing.
Figure 5. Throughput of perf bench futex hash with every thread on one bucket, the worst case for an abort gate; higher is better. mainline is Linux 6.19. case for our approach: the gate’s extra complexity buys nothing without aborts. Figure 5 reports throughput on the six machines; the “Raw ticket” and “Raw queue” curves show each abortable lock used as the bucket lock, without the gate and its trylock fast path. Both gates stay close to mainline’s throughput. Ticket reaches 0.95 of mainline on geometric mean and 0.82 at full subscription; queue achieves 0.92 and 0.89. Ticket is less steady: its full-subscription ratio ranges from 0.44 on amd-256 to 1.08 on amd-512, against 0.78 to 1.30 for queue, and it degrades as threads are added, on amd-256 from 1.31 at 32 threads to 0.44 at 256. Ticket’s waiters all spin on a single variable (§ 3.1.2), which does not scale, as confirmed by the “Raw” curves; the gate hides most of it by moving the handover off the critical path (§ 3.1), and which gate is faster depends on the machine. Because gates are activated on demand, in real applications, only the buckets that see wake-alls pay any of the gate’s overhead over mainline’s qspinlock, and an application’s user mutexes often will not share a bucket with the few futexes that receive wake-alls, so the impact on user mutexes is limited. 5.3
Our approach vs. using a TCLock
NAS applications
Figure 6a reports our approach’s speedups on the NAS OpenMP benchmark kernels [3]. On the six kernels that cross barriers frequently (bt, cg, lu, mg, sp, ua), our approach is 1.8 to 1.9× faster than mainline on geometric mean at class A (the smallest considered input size), depending on the gate, with a maximum of 4.4× for ua on amd-256; ep, ft, and is, which use fewer barriers, stay within 0.97 and 1.16 of mainline. The two gates have similar performance, but ticket is slightly slower than queue on the larger machines (256+ CPUs) on the very high barrier frequency benchmarks cg and ua, particularly on the smaller problem sizes. The speedups decrease as the input class grows, to 1.6× at class
5.5
Our approach vs. LLVM OpenMP barriers
We compiled the NAS applications of § 5.3 with GCC, whose OpenMP runtime’s barrier issues a single wake-all. LLVM’s runtime instead wakes barrier waiters through a tree, with a separate FUTEX_WAKE call per task. Figure 6c compares the NAS kernels compiled with LLVM with the NAS kernels compiled with GCC, with each compiler using its own OpenMP library. LLVM’s tree helps mainline on larger machines and hurts on others, but our approach under GCC beats mainline LLVM everywhere, by 1.2 to 1.8× on geometric mean. 9
Jean-Pierre Lozi and Julia Lawall
(a) NAS OpenMP benchmarks, passive wait policy, one pinned thread per CPU. For each machine and class, the class line gives mainline’s median runtime in seconds, and the two lines below it each abort gate’s speedup over it, with darker cells for larger speedups. mg 0.21 s 1.62 × 1.47 × 0.49 s 1.36 × 1.35 × 2.75 s 1.05 × 1.05 × 46.85 s 1.01 × 1.01 × 0.22 s 1.62 × 1.63 × 0.71 s 1.98 × 2.01 × 2.02 s 1.22 × 1.22 × 25.69 s 1.04 × 1.04 × 0.20 s 1.81 × 2.13 × 0.66 s 2.80 × 3.12 × 1.22 s 1.72 × 1.76 × 12.76 s 1.13 × 1.13 × 0.55 s 1.43 × 1.41 × 1.47 s 2.25 × 2.28 × 2.49 s 1.63 × 1.64 × 22.70 s 1.16 × 1.15 × 0.19 s 1.16 × 1.16 × 0.58 s 1.22 × 1.23 × 3.59 s 1.03 × 1.04 × 64.91 s 1.00 × 1.00 × 0.42 s 1.54 × 1.68 × 1.34 s 2.08 × 2.36 × 3.64 s 1.29 × 1.32 × 57.81 s 1.00 × 1.00 ×
sp 0.90 s 1.39 × 1.38 × 2.88 s 1.08 × 1.08 × 17.08 s 1.03 × 1.03 × 365 s 1.02 × 1.01 × 1.64 s 2.38 × 2.44 × 2.74 s 1.53 × 1.55 × 8.54 s 1.05 × 1.05 × 203 s 1.00 × 1.00 × 1.52 s 3.04 × 3.21 × 1.97 s 2.02 × 1.99 × 4.58 s 1.33 × 1.32 × 87.92 s 1.01 × 1.01 × 3.16 s 3.15 × 3.15 × 3.74 s 2.21 × 2.12 × 7.17 s 1.41 × 1.38 × 160 s 1.06 × 1.05 × 0.84 s 1.66 × 1.63 × 3.66 s 1.08 × 1.08 × 20.67 s 1.01 × 1.01 × 484 s 1.00 × 1.00 × 3.09 s 2.22 × 2.60 × 6.29 s 1.28 × 1.35 × 23.66 s 1.06 × 1.07 × 564 s 1.00 × 1.01 ×
Name intel-192 intel-104 amd-512 amd-256 arm-80 arm-256
ua 5.20 s 2.31 × 2.28 × 7.25 s 1.75 × 1.73 × 19.24 s 1.17 × 1.17 × 349 s 1.01 × 1.01 × 13.43 s 3.45 × 3.48 × 14.87 s 2.89 × 2.95 × 19.27 s 2.14 × 2.22 × 176 s 1.06 × 1.06 × 14.23 s 4.23 × 4.43 × 15.38 s 3.95 × 4.00 × 18.06 s 3.09 × 3.10 × 98.47 s 1.12 × 1.12 × 29.60 s 2.98 × 3.71 × 31.76 s 3.70 × 3.55 × 35.29 s 3.49 × 3.37 × 166 s 1.23 × 1.23 × 4.07 s 2.38 × 2.42 × 6.68 s 1.82 × 1.82 × 21.74 s 1.15 × 1.15 × 416 s 1.01 × 1.01 × 23.61 s 2.80 × 3.61 × 26.88 s 2.43 × 2.94 × 40.57 s 1.65 × 1.81 × 353 s 1.07 × 1.08 ×
CPU Intel Xeon Platinum 8568Y+ Intel Xeon Gold 5320 AMD EPYC 9754 AMD EPYC 9555 Ampere Altra Q80-30 ARM ThunderX2 99xx
Frequency S×C×T Date 2.30 GHz 2×48×2 2024 2.20 GHz 2×26×2 2023 2.25 GHz 2×128×2 2024 3.20 GHz 2×64×2 2025 3.00 GHz 1×80×1 2025 2.20 GHz 2×32×4 2019
(c) The NAS kernels under LLVM’s OpenMP runtime. Each cell is a geometric-mean speedup over the six barrier-intensive kernels: left, mainline LLVM over mainline GCC; right, our approach (queue, under GCC) over mainline LLVM. Machine intel-104 intel-192 amd-256 amd-512 arm-80 arm-256
LLVM vs. Mainline GCC Class A Class B Class C 0.83 × 0.82 × 0.77 × 1.33 × 1.27 × 1.09 × 1.64 × 1.64 × 1.22 × 1.81 × 1.76 × 1.40 × 0.82 × 0.80 × 0.81 × 1.23 × 1.01 × 0.83 ×
Queue (GCC) vs. LLVM Class A Class B Class C 1.75 × 1.48 × 1.36 × 1.59 × 1.39 × 1.19 × 1.54 × 1.40 × 1.38 × 1.26 × 1.21 × 1.22 × 1.80 × 1.50 × 1.28 × 1.57 × 1.54 × 1.46 ×
(d) Ablation on the NAS kernels, with the queue gate: our full approach, our approach with the abort disabled (“No ab.”), and our approach with the parallel wake disabled (“No wk.”). Each cell is the variant’s geometric-mean speedup over mainline on the six barrierintensive kernels. Machine Full intel-104 1.46 × intel-192 2.12 × amd-256 2.53 × 2.29 × amd-512 arm-80 1.47 × 1.93 × arm-256
Class A No ab. No wk. Full 1.33 × 1.04 × 1.22 × 1.71 × 1.04 × 1.76 × 1.56 × 0.99 × 2.30 × 1.41 × 1.03 × 2.14 × 1.35 × 1.02 × 1.20 × 1.76 × 1.01 × 1.55 ×
Class B No ab. No wk. 1.16 × 1.01 × 1.54 × 1.03 × 1.64 × 0.98 × 1.43 × 1.04 × 1.17 × 1.00 × 1.47 × 1.00 ×
Full 1.05 × 1.30 × 1.69 × 1.70 × 1.04 × 1.21 ×
Class C No ab. No wk. 1.04 × 1.00 × 1.23 × 1.01 × 1.42 × 0.99 × 1.32 × 1.02 × 1.04 × 1.00 × 1.19 × 1.00 ×
(e) Execution traces of cg.A barriers under mainline Linux 6.19, our approach without the parallel wake, our approach without the abort gate, and our full approach. wait B1 wait B2
wait B3 wait B4
running wake-all
waker
255 (a) Linux 6.19 CPU
lu 1.15 s 1.08 × 1.08 × 3.68 s 1.03 × 1.03 × 15.55 s 1.00 × 0.99 × 261 s 0.96 × 0.98 × 1.27 s 1.34 × 1.35 × 2.68 s 1.06 × 1.07 × 7.49 s 1.01 × 1.01 × 129 s 1.00 × 1.00 × 1.13 s 1.59 × 1.62 × 2.19 s 1.24 × 1.22 × 5.92 s 1.08 × 1.10 × 72.37 s 0.99 × 1.00 × 2.13 s 1.55 × 1.56 × 3.89 s 1.23 × 1.24 × 10.19 s 1.06 × 1.06 × 88.04 s 1.01 × 1.01 × 0.97 s 1.08 × 1.08 × 3.14 s 1.03 × 1.03 × 12.17 s 1.00 × 1.00 × 227 s 1.00 × 1.00 × 2.44 s 1.26 × 1.36 × 6.97 s 1.06 × 1.09 × 27.42 s 1.07 × 1.04 × 580 s 1.01 × 1.00 ×
240 15
CPU 216
0 255 (b) No tree CPU
is 0.05 s 0.99 × 1.01 × 0.14 s 1.01 × 1.01 × 0.49 s 1.00 × 1.00 × –† –† –† 0.04 s 1.06 × 1.05 × 0.07 s 1.02 × 1.01 × 0.22 s 1.00 × 1.00 × –† –† –† 0.04 s 1.15 × 1.15 × 0.07 s 1.08 × 1.07 × 0.18 s 1.03 × 1.03 × –† –† –† 0.11 s 1.16 × 1.14 × 0.14 s 1.08 × 1.10 × 0.29 s 1.05 × 1.03 × –† –† –† 0.04 s 1.04 × 1.04 × 0.11 s 1.00 × 1.01 × 0.40 s 1.00 × 1.00 × –† –† –† 0.11 s 1.04 × 1.08 × 0.19 s 1.02 × 1.03 × 0.57 s 1.01 × 1.01 × –† –† –†
240 15
CPU 75
0 255 (c) No abort CPU
cg ep ft 0.17 s 0.13 s 0.11 s 1.85 × 1.00 × 1.00 × 1.86 × 1.00 × 1.02 × 1.77 s 0.47 s 0.99 s 1.29 × 1.00 × 1.00 × 1.27 × 1.00 × 1.00 × 4.96 s 1.23 s 4.41 s 1.06 × 1.00 × 1.00 × 1.05 × 1.00 × 1.00 × 154 s 18.57 s 203 s 1.00 × 1.00 × 0.99 × 1.00 × 1.00 × 1.00 × 0.41 s 0.11 s 0.06 s 3.15 × 1.00 × 1.08 × 3.25 × 1.01 × 1.08 × 2.09 s 0.19 s 0.46 s 2.49 × 1.00 × 1.01 × 2.54 × 1.00 × 1.00 × 2.88 s 0.51 s 1.96 s 1.60 × 1.00 × 0.99 × 1.62 × 1.00 × 1.00 × 76.35 s 7.09 s 56.63 s 1.01 × 1.00 × 1.00 × 1.01 × 1.00 × 1.00 × 0.37 s 0.09 s 0.06 s 2.15 × 0.99 × 1.11 × 3.07 × 0.97 × 1.12 × 2.49 s 0.20 s 0.34 s 2.98 × 0.99 × 1.04 × 3.87 × 0.98 × 1.05 × 2.94 s 0.35 s 1.07 s 2.41 × 0.99 × 1.00 × 2.74 × 0.99 × 1.00 × 30.59 s 4.45 s 26.41 s 1.06 × 0.99 × 1.00 × 1.06 × 1.00 × 0.99 × 0.78 s 0.36 s 0.12 s 2.35 × 1.00 × 1.10 × 2.64 × 0.98 × 1.12 × 4.43 s 0.42 s 0.58 s 2.90 × 1.00 × 1.04 × 3.21 × 0.98 × 1.05 × 5.12 s 0.67 s 1.71 s 2.58 × 1.00 × 1.01 × 2.65 × 0.99 × 1.02 × 63.72 s 3.70 s 57.08 s 1.06 × 1.00 × 1.00 × 1.04 × 1.00 × 1.00 × 0.14 s 0.10 s 0.11 s 1.42 × 1.00 × 1.02 × 1.79 × 1.00 × 1.02 × 2.35 s 0.30 s 1.10 s 1.18 × 1.00 × 1.01 × 1.17 × 1.00 × 1.01 × 6.24 s 1.08 s 5.85 s 1.06 × 1.00 × 1.00 × 1.06 × 1.00 × 1.00 × 511 s 16.62 s 280 s 1.00 × 1.00 × 1.01 × 1.00 × 1.00 × 1.02 × 0.77 s 0.41 s 0.27 s 1.56 × 1.01 × 1.05 × 1.73 × 1.00 × 1.06 × 9.10 s 1.02 s 2.55 s 1.25 × 1.00 × 1.02 × 1.28 × 1.00 × 1.02 × 23.83 s 2.54 s 12.73 s 1.19 × 1.00 × 1.00 × 1.17 × 1.00 × 1.00 × 431 s 24.85 s 445 s 1.01 × 1.00 × 1.00 × 0.98 × 1.00 × 1.00 ×
240 15
CPU 134
CPU 84
0
0 255 (d) Full CPU
arm-256
arm-80
amd-512
amd-256
intel-192
intel-104
bt Class A 0.96 s Ticket 1.05 × Queue 1.05 × Class B 4.12 s Ticket 1.01 × Queue 1.01 × Class C 17.95 s Ticket 1.00 × Queue 1.00 × Class D 382 s Ticket 1.00 × Queue 1.00 × Class A 0.84 s Ticket 1.50 × 1.51 × Queue Class B 2.16 s Ticket 1.18 × 1.18 × Queue Class C 8.58 s Ticket 1.02 × Queue 1.02 × Class D 182 s Ticket 1.00 × Queue 1.00 × Class A 0.64 s Ticket 1.80 × Queue 1.75 × Class B 1.37 s Ticket 1.25 × Queue 1.25 × Class C 4.28 s Ticket 1.13 × Queue 1.09 × Class D 80.85 s Ticket 0.98 × Queue 0.98 × Class A 1.18 s Ticket 2.18 × Queue 2.12 × Class B 1.83 s Ticket 1.47 × 1.41 × Queue Class C 4.93 s Ticket 1.12 × 1.13 × Queue Class D 91.13 s Ticket 1.00 × Queue 1.01 × Class A 0.68 s Ticket 1.15 × Queue 1.15 × Class B 3.17 s Ticket 1.02 × Queue 1.02 × Class C 14.00 s Ticket 1.01 × Queue 1.01 × Class D 321 s Ticket 1.00 × Queue 1.00 × Class A 1.83 s Ticket 1.33 × Queue 1.38 × Class B 6.29 s Ticket 1.07 × Queue 1.08 × Class C 24.48 s Ticket 1.01 × Queue 1.02 × Class D 817 s Ticket 1.01 × Queue 1.00 × † Does not compile.
(b) Machines used in our experiments. “Name” is how each machine is identified in the figures; S×C×T is sockets × cores per socket × threads per core.
100
200
300
400
500
240 15 0
600 Zoom 6× CPU 155
0
100
0
20 time (µs)
40
60
80
100
Figure 6. Machine specifications, results from the NAS, LLVM, and ablation experiments, and execution traces of cg.A. 10
Mainline Queue Mainline, active waiters intel-104 intel-192 amd-256 1 1 1 10 10 10 0 0 10 10 100 amd-512 arm-80 arm-256 101 101 101 100 1 10 1 10 1 10 100 1 10 1 10 1 10 100 1 10 1 10 1 10
Mainline Queue TCLocks intel-104 intel-192 amd-256 amd-512 300 160 60 500 150 80 30 250 00 60 00 100 00 150 00 300 Threads Threads Threads Threads
Norm. time
Time (µs)
Lightning-Speed Futexes
A
5.6
Mainline A (s) Mainline B (s) Mainline C (s)
C
A
B
C
Class and #spinners
A
B
C
Class and #spinners
intel-104 intel-192 amd-256 amd-512 arm-80 arm-256 0.76 1.14 1.03 2.15 0.62 2.17 2.55 2.66 2.31 4.20 2.63 6.70 10.38 6.28 4.43 7.39 10.94 19.55
Ablation Figure 8. The six barrier-intensive kernels at classes A, B, and C, while 1 or 10 spinner processes compete for the CPUs: geometric mean of the runtime, normalized to mainline without spinners at the same class. Lower is better; log scale.
We remove our approach’s two mechanisms one at a time in Figure 6d: the “No ab.” columns show our approach without the abort gate (§ 3.1), and the “No wk.” columns show our approach without the parallel wake (§ 3.2). Either change has a substantial performance impact; removing the parallel wake eliminates almost all gains over the baseline, on all machine and NAS kernel sizes. To better understand the complementarity of the two mechanisms, we consider an extract of an execution trace of cg.A, shown in Figure 6e. Thread executions are shown by horizontal grey lines, barriers by dotted vertical lines, and waits by marks with various shapes, according to the current barrier. With mainline (Figure 6e(a)), thread wakes occur over a relatively long period, as they are triggered by the waker one by one. This issue persists with only the abort gate (Figure 6e(b)), although threads that happen to be trying to acquire the bucket lock at the time of the waker’s attempt have their attempts aborted, and can cross the barrier immediately (cf. the blue and red marks quite close to the central barrier). On the other hand, the tree wake (Figure 6e(c)) converts the cloud of wake-ups to a well-synchronized pile (cf. 400s), but aligning the waking threads then increases contention on the bucket lock in the next barrier (cf. 500s, 600s). Combining the mechanisms (Figure 6e(d)) provides the synchronized waking time of the tree wake, with the avoidance of contention on the bucket lock of the abort. Barriers are substantially shorter, improving overall performance. 5.7
B
Class and #spinners
Figure 7. Time per pthread barrier on the x86 machines, with a TCLock [15] as the futex hash-bucket lock.
it has the best performance. On the other hand, mainline active maximizes a thread’s chance of being delayed by preemption from entering the next barrier, by waiting using spinning. Our approach is sometimes slower than mainline passive because of its parallel wake: a woken delegate must be scheduled before it can wake further threads, and may wait behind the load processes for a CPU, whereas mainline’s single waker is already running. The greatest impact is on NAS kernels in the A class with a high rate of barriers. For example, on intel-104, ua incurs a slowdown of 5.6× with mainline passive and of 12.2× with our approach and passive. Mainline active incurs a slowdown of 58.6×. 5.8
Other applications
Beyond NAS, Figure 9 reports our approach’s speedups on applications that use barriers: benchmarks from Rodinia [7], GAPBS [4], and oneDNN [1], as well as the proxy applications clomp [6], cloverleaf [25], kripke [21], lulesh [16], pennant [12], and tealeaf [26]. Inputs are manually chosen to illustrate the impact of frequent barriers. For applications that are part of the Phoronix Test Suite [2], we also use their inputs. Command lines are in the supplementary material. oneDNN is reported on the x86 machines only: it does not target ARM, where some tests reject their arguments and others run for hours. As in the oversubscription case (§ 5.7), we compare the performance of our approach to that of mainline active and mainline passive. Mainline active, in the absence of oversubscription, by making the transition to the next barrier instantaneous, typically represents the best performance that the application can achieve, given the work that it must perform. Figure 9 shows that our approach often achieves substantial performance improvements over mainline passive, the baseline (the horizontal line at 1), and that it also often comes close to the performance of mainline active:
Oversubscription
Figure 8 shows the impact of oversubscription: A NAS kernel runs its threads on all CPUs of the machine while 1 or 10 independent load processes spin unpinned on the same set of CPUs. We compare our approach, with OpenMP passive waiting, to mainline with either OpenMP passive or OpenMP active waiting, illustrating sleeping or spinning waiting, respectively. The NAS application is delayed when a load process preempts a thread during its work, delaying the start of the next barrier, or while it enters or waits at a barrier, delaying it in reaching the next barrier that the other threads have already started. Mainline passive shrinks that window to the cost of taking the bucket lock and sleeping; 11
101 100
CF
Dd C o u FD b le C (P ) Clo LOM C ve P Clo love rLea ve rLea f rLe f af 3d 6 G A 4 (P PB ) GA S b PB c GA S bfs PB GA S cc G A P BS P B pr S GA sssp PB H S tc Ho otSp tSp ot ot (P Kri ) Kri pke pk e o L (P on neDN LU ULE ) eD N LE SH NN bf SH bf1 16 c (P 6 m on v ) on atm (P) eD u o n N N l (P ) eD bin on NN ary eD b n N or on N co m eD n c o n o e NN at on neDN DNN con eD N el v NN f3 tw f32 2 co ise m nv on atm (P) eD u l o n N N l (P ) on eDN norm o n eD N p e D N N re o NN reo lu on neDN resa rde eD N mp r NN s8 lin s8 con g on matm v (P) e on DNN ul (P eD s h ) NN u f fl on soft e eD ma NN x s Le um b la n Se c do v S SR RAD AD (P Tea TeaL ) Le eaf Tea af b L m Tea eaf b 2 L m Tea eaf b 3 Le m4 af bm 5
Speedup
Jean-Pierre Lozi and Julia Lawall
Mainline, active waiters
Queue
Figure 9. Speedups over mainline with the passive (sleeping) wait policy, on applications that use barriers. Each application has one thin pair of bars per machine, from left to right intel-104, intel-192, amd-256, amd-512, arm-80, and arm-256. The y-axis is logarithmic, and the black horizontal line marks a speedup of 1. Red bars represent mainline with spinning waiters (OMP_WAIT_POLICY=active), as a baseline; blue bars are queue, whose waiters sleep. Runtimes are in the supplementary material. (P) marks the Phoronix Test Suite inputs; “Leblanc” and “Sedov” are the PENNANT inputs. over the measured configurations, our approach is 2.1× faster than mainline passive on geometric mean, with a maximum of 6.2× for TeaLeaf on amd-256, and reaches 78% of the performance of mainline active. As one example, consider Kripke; this application is characterized by longer work phases, and thus the cost of the transition from one barrier to the next has little impact on the overall running time. Both our approach and mainline active achieve little speedup. As another example, LULESH has data size 40, while LULESH (P) has data size 128. As for the NAS kernel classes, the smaller data size gives more speedup, because a greater portion of the running time is devoted to transitioning between barriers. Unlike Kripke, however, LULESH sees a speedup at both sizes, and our approach achieves most of the performance of mainline active. 5.9
of conflicts on the pool’s words, and therefore differentiate queue as much as possible from ticket, whose waiters all spin on a single line. Consequently, the pool size is 512 KB on our largest machine, amd-512, and 128 KB on the smallest. However, experiments on the NAS applications showed that reducing the budget to a single cache line, 𝜌 = 1, adds negligible overhead (<1%), so a quarter of this memory, 128 KB on amd-512 down to 32 KB, is sufficient to obtain similar performance. Memory usage could be reduced further by sharing a single pool among all processes, since the maximum number of live pool words depends on 𝑁 cpu , not on the number of processes or threads; we leave this design for future work.
6
Related Work
Scalable barriers. In 1991, a study by Mellor-Crummey and Scott [27] discussed existing spinning barriers that organize their waiters into trees, and proposed a new one. Our approach’s parallel wake applies the same idea to blocking barriers.
Impact of parameters
Our approach has three parameters: the wake batch 𝑁 , the linger factor 𝜆, and the pool budget 𝜌. All three are fixed across the kernels we evaluate; we now examine their impact. The wake batch (§ 3.2) is 𝑁 = 4. We tried values between 1 and 12 on the NAS applications, and overall the choice had almost no impact; in a few cases, a larger or smaller value incurred some overhead, so we chose 𝑁 = 4. The linger factor (§ 3.1) is 𝜆 = 4: a bucket’s gate deactivates after 𝜆𝑁 cpu contended entries with no wake-all. We have not found a workload where its value has an impact, because deactivation only helps a bucket that alternates between phases that include wake-alls and long stretches during which the bucket is used without wake-alls. For instance, an application that alternates between going through many barriers and acquiring locks only could potentially benefit from a fine-tuned linger factor. However, few applications have such phases, and only a subset of hash buckets would be affected. The pool budget (§ 3.1.2) is 𝜌 = 4 cache lines. The more lines, the further apart queue’s waiters spread, at a cost in memory. We chose a large 𝜌 value to minimize the possibility
Spinning versus blocking. The choice between spinning and blocking has mainly been studied for locks. Laforet et al. [22] show that no static spin-then-block budget suits all subscription levels, and propose FlexGuard, a lock design that uses eBPF to block exactly when the lock holder is preempted. FlexGuard decides when a lock’s waiters should block; our approach instead makes blocking cheaper for the waiters of a wake-all, typically those of a barrier. Futexes. Franke et al. [13] introduced futexes, and Drepper [11] describes their user-level contract. Later kernels added priority inheritance, requeue, futex_waitv, and perprocess hash tables [33], but kept the wake-all list traversal under a lock followed by sequential wake-ups. Real-time variants of futexes have been explored in LITMUSRT [34]. BCD [38] proposed having the thread that releases a contended user-level lock, at FUTEX_WAKE, execute the waiting threads’ critical sections, a form of delegation [15, 24, 30]. 12
Lightning-Speed Futexes
BCD’s authors note that the futex bucket lock is a bottleneck, which our approach removes on the wake-all path.
[4] Scott Beamer, Krste Asanović, and David Patterson. 2015. The GAP Benchmark Suite. arXiv:1508.03619. [5] Ankit Bhardwaj, Chinmay Kulkarni, Reto Achermann, Irina Calciu, Sanidhya Kashyap, Ryan Stutsman, Amy Tai, and Gerd Zellweger. 2021. NrOS: Effective Replication and Sharing in an Operating System. In Proceedings of the 15th USENIX Symposium on Operating Systems Design and Implementation (OSDI). [6] Greg Bronevetsky, John Gyllenhaal, and Bronis R. de Supinski. 2009. CLOMP: Accurately Characterizing OpenMP Application Overheads. International Journal of Parallel Programming 37, 3 (2009), 250–265. [7] Shuai Che, Michael Boyer, Jiayuan Meng, David Tarjan, Jeremy W. Sheaffer, Sang-Ha Lee, and Kevin Skadron. 2009. Rodinia: A Benchmark Suite for Heterogeneous Computing. In Proceedings of the 2009 IEEE International Symposium on Workload Characterization (IISWC). [8] Rafael Lourenço de Lima Chehab, Antonio Paolillo, Diogo Behrens, Ming Fu, Hermann Härtig, and Haibo Chen. 2021. CLoF: A Compositional Lock Framework for Multi-level NUMA Systems. In Proceedings of the 28th ACM Symposium on Operating Systems Principles (SOSP). [9] Jonathan Corbet. 2014. MCS Locks and Qspinlocks. https://lwn.net/ Articles/590243/. [10] Tudor David, Rachid Guerraoui, and Vasileios Trigonakis. 2013. Everything You Always Wanted to Know about Synchronization but Were Afraid to Ask. In Proceedings of the 24th ACM Symposium on Operating Systems Principles (SOSP). [11] Ulrich Drepper. 2011. Futexes Are Tricky. https://www.akkadia.org/ drepper/futex.pdf. [12] Charles R. Ferenbaugh. 2015. PENNANT: An Unstructured Mesh Mini-App for Advanced Architecture Research. Concurrency and Computation: Practice and Experience 27, 17 (2015), 4555–4572. [13] Hubertus Franke, Rusty Russell, and Matthew Kirkwood. 2002. Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux. In Proceedings of the Ottawa Linux Symposium. [14] Hugo Guiroux, Renaud Lachaize, and Vivien Quéma. 2016. Multicore Locks: The Case Is Not Closed Yet. In Proceedings of the 2016 USENIX Annual Technical Conference (USENIX ATC). [15] Vishal Gupta, Kumar Kartikeya Dwivedi, Yugesh Kothari, Yueyang Pan, Diyu Zhou, and Sanidhya Kashyap. 2023. Ship your Critical Section, Not Your Data: Enabling Transparent Delegation with TCLocks. In Proceedings of the 17th USENIX Symposium on Operating Systems Design and Implementation (OSDI). [16] Ian Karlin, Jeff Keasler, and J. Robert Neely. 2013. LULESH 2.0 Updates and Changes. Technical Report LLNL-TR-641973. Lawrence Livermore National Laboratory. [17] Sanidhya Kashyap, Irina Calciu, Xiaohe Cheng, Changwoo Min, and Taesoo Kim. 2019. Scalable and Practical Locking with Shuffling. In Proceedings of the 27th ACM Symposium on Operating Systems Principles (SOSP). [18] Sanidhya Kashyap, Changwoo Min, and Taesoo Kim. 2017. Scalable NUMA-aware Blocking Synchronization Primitives. In Proceedings of the 2017 USENIX Annual Technical Conference (USENIX ATC). [19] Tae Woo Kim, Youngjin Kwon, and Jeehoon Kang. 2025. Scalable Address Spaces using Concurrent Interval Skiplist. In Proceedings of the 31st ACM Symposium on Operating Systems Principles (SOSP). [20] Orran Krieger, Marc Auslander, Bryan Rosenburg, Robert W. Wisniewski, Jimi Xenidis, Dilma Da Silva, Michal Ostrowski, Jonathan Appavoo, Maria Butrico, Mark Mergen, Amos Waterland, and Volkmar Uhlig. 2006. K42: Building a Complete Operating System. In Proceedings of the 1st European Conference on Computer Systems (EuroSys). [21] Adam J. Kunen, Teresa S. Bailey, and Peter N. Brown. 2015. KRIPKE: A Massively Parallel Transport Mini-App. In Joint International Conference on Mathematics and Computation (M&C), Supercomputing in Nuclear Applications (SNA) and the Monte Carlo (MC) Method.
Scalable locking. Many designs improve the throughput or fairness of contended locks, such as queue locks [27, 36], shuffling locks [17], asymmetry-aware locks [23], locks for message-passing architectures [35], scheduler-cooperative locks [28], and delegation locks [15, 24, 30]; empirical studies have compared lock variants [10, 14]. Other work makes blocking kernel primitives NUMA-aware [18], composes simple spinlock algorithms into NUMA-aware lock algorithms, with a correctness argument checked by model checkers [8], partitions or replicates kernel data structures to avoid shared locks [5, 20], or replaces a contended lock with a concurrent data structure [19]. Our approach lets a wake-all abort all lock acquisitions queued ahead of its own. The abortable queue locks of Scott and Scherer [32] solve a harder problem: any waiter may abandon its acquisition at any time. Leaving the middle of a linked queue requires handshakes with the neighboring waiters, and the handshakes stall when a neighbor is preempted; the non-blocking variants avoid the stall at the price of unbounded worst-case space [31]. Our approach’s gates support a single, weaker operation, aborting every acquisition queued before a designated one, which a ticket lock’s implicit queue (used by both ticket and queue) provides in constant time.
7
Conclusion
We have presented a redesign of the Linux futex wake-all path. Our approach lets a waker abort the acquisitions queued ahead of it on the bucket lock through an abort gate, detaches the whole waiter set in constant time, and distributes the wake-ups over the woken threads, turning the serial wake-all into one with a logarithmic critical path. Future work includes further optimizing our approach on NUMA and heterogeneous machines, where the choice and the order of the delegate wakers could take the distance and the speed of the cores they wake into account. On six Intel, AMD, and ARM servers, our approach speeds up a blocking barrier by up to 8.7×, the barrier-intensive NAS kernels by 1.3× to 1.9× on geometric mean, and 45 barrier-heavy applications by 2.1×, up to 6.2×, without slowing the workloads that never issue a wake-all.
References [1] 2026. oneDNN: oneAPI Deep Neural Network Library. https://github. com/uxlfoundation/oneDNN. [2] 2026. Phoronix Test Suite. https://www.phoronix-test-suite.com. [3] David H. Bailey, Eric Barszcz, John T. Barton, David S. Browning, Robert L. Carter, Leonardo Dagum, Rod A. Fatoohi, Paul O. Frederickson, Thomas A. Lasinski, Rob S. Schreiber, Horst D. Simon, V. Venkatakrishnan, and Sisira K. Weeratunga. 1991. The NAS Parallel Benchmarks. International Journal of High Performance Computing Applications 5, 3 (1991), 63–73. 13
Jean-Pierre Lozi and Julia Lawall
[22] Victor Laforet, Sanidhya Kashyap, Călin Iorgulescu, Julia Lawall, and Jean-Pierre Lozi. 2025. FlexGuard: Fast Mutual Exclusion Independent of Subscription. In Proceedings of the 31st ACM Symposium on Operating Systems Principles (SOSP). [23] Nian Liu, Jinyu Gu, Dahai Tang, Kenli Li, Binyu Zang, and Haibo Chen. 2022. Asymmetry-aware Scalable Locking. In Proceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP). [24] Jean-Pierre Lozi, Florian David, Gaël Thomas, Julia Lawall, and Gilles Muller. 2012. Remote Core Locking: Migrating Critical-Section Execution to Improve the Performance of Multithreaded Applications. In Proceedings of the 2012 USENIX Annual Technical Conference (USENIX ATC). [25] Andrew C. Mallinson, David A. Beckingsale, Wayne P. Gaudin, J. Andrew Herdman, John M. Levesque, and Stephen A. Jarvis. 2013. CloverLeaf: Preparing Hydrodynamics Codes for Exascale. In A New Vintage of Computing: Cray User Group (CUG). [26] Simon McIntosh-Smith, Matthew Martineau, Tom Deakin, et al. 2017. TeaLeaf: A Mini-Application to Enable Design-Space Explorations for Iterative Sparse Linear Solvers. In Proceedings of the 2017 IEEE International Conference on Cluster Computing (CLUSTER). 842–849. [27] John M. Mellor-Crummey and Michael L. Scott. 1991. Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. ACM Transactions on Computer Systems 9, 1 (1991), 21–65. [28] Yuvraj Patel, Leon Yang, Leo Prasath Arulraj, Andrea C. ArpaciDusseau, Remzi H. Arpaci-Dusseau, and Michael M. Swift. 2020. Avoiding Scheduler Subversion using Scheduler-Cooperative Locks. In Proceedings of the 15th European Conference on Computer Systems (EuroSys). [29] David Peter. 2026. hyperfine: A Command-Line Benchmarking Tool. https://github.com/sharkdp/hyperfine.
[30] Sepideh Roghanchi, Jakob Eriksson, and Nilanjana Basu. 2017. ffwd: Delegation is (Much) Faster than You Think. In Proceedings of the 26th ACM Symposium on Operating Systems Principles (SOSP). [31] Michael L. Scott. 2002. Non-Blocking Timeout in Scalable QueueBased Spin Locks. In Proceedings of the 21st Annual ACM Symposium on Principles of Distributed Computing (PODC). [32] Michael L. Scott and William N. Scherer. 2001. Scalable Queue-Based Spin Locks with Timeout. In Proceedings of the 8th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP). [33] Sebastian Andrzej Siewior. 2025. futex: Add Support for Task Local Hash Maps, FUTEX2_NUMA and FUTEX2_MPOL. https://lwn.net/ Articles/1017716/. Merged in Linux 6.16, enabled by default since 6.17. [34] Roy Spliet, Manohar Vanga, Björn B. Brandenburg, and Sven Dziadek. 2014. Fast on Average, Predictable in the Worst Case: Exploring RealTime Futexes in LITMUSRT . In Proceedings of the 35th IEEE Real-Time Systems Symposium (RTSS). [35] Xiongchao Tang, Jidong Zhai, Xuehai Qian, and Wenguang Chen. 2019. pLock: A Fast Lock for Architectures with Explicit Inter-core Message Passing. In Proceedings of the 24th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS). [36] Tianzheng Wang, Milind Chabbi, and Hideaki Kimura. 2016. Be My Guest: MCS Lock Now Welcomes Guests. In Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP). [37] Rafael J. Wysocki. 2026. Timer Events Oriented (TEO) CPU Idle Governor. Linux 6.19 kernel documentation, https://www.kernel.org/ doc/html/v6.19/admin-guide/pm/cpuidle.html. [38] Junyao Zhang, Zhuo Wang, and Zhe Zhou. 2026. Binary Compatible Critical Section Delegation. In Proceedings of the 31st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP).
14
Related documents
- Lightning-Speed Futexes#1842725
- CVE-2026-130477 — HIGH 8.8#1811442
- Zennar Ltd v Molssi Fashion Shanghai Ltd [2026] EWHC 2787 (BP) (30 October 2026)#1495174
- caltechlibrary/commonpy: Release 0.0.3#1543298
- Singleton Higson Coronas of Uncountable Groups#1807743
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive