ShflLocks are a family of locking protocols that implement use shuffling mechanism to implement several policies, such as NUMA-awareness, or blocking. We implement three locking protocols: NUMA-aware spinlock, NUMA-aware blocking mutex, and NUMA-aware blocking rwlock.
ShflLock for the kernel(klocks) is provided under the terms of
GNU General Public License v2, and the user library(ulocks)
is released under the terms of MIT license. Please see the LICENSE
files in each directory.
To test locks in the kernelspace, use a patch in the klocks folder.
The patch is written on top of linux v4.19
- Please checkout the Linux v4.19-rc4 version of the Linux kernel
$ git clone --branch v4.19-rc4 https://github.com/torvalds/linux
$ cd linux- Use monkey patching to apply these patches for running Linux with different versions.
$ patch -p1 < <path-to-path>We extend the Litl framework (ulocks) and use the LD_PRELOAD for usersapce benchmarks.
| Name | Ref | Waiting Policy Supported | Name in the Paper [LOC] | Notes and acknowledgments |
|---|---|---|---|---|
| AQS | [NUMA-MCS] | original (spin) | non-block shfllock | ShflLock paper |
| AQS-WO-NODE | [NUMA-MCS] | spin | non-block shfllock wo node | ShflLock paper |
| AQM | [NUMA-MUT] | spin_then_park | blocking shfllock | ShflLock paper |
| AQM-WO-NODE | [NUMA-MUT] | spin_then_park | blocking shfllock wo node | ShflLock paper |
Compile the Litl framework as follows:
make -C ulocksIf you want to use non-blocking ShflLock, do the following:
./libaqs_spinlock.sh my_programYou can find more details in ulocks/README.md.
- Sanidhya Kashyap (sanidhya@gatech.edu)