journal article·2024-07-24Open access

CAL: Core-Aware Lock for the big.LITTLE Multicore Architecture

Shiqiang Nie, Yingming Liu, Jie Niu, Weiguo Wu

Applied Sciences· Volume 14· Issue 15

Abstract

The concept of “all cores are created equal” has been popular for several decades due to its simplicity and effectiveness in CPU (Central Processing Unit) design. The more cores the CPU has, the higher performance the host owns and the higher the power consumption. However, power-saving is also one of the key goals for servers in data centers and embedded devices (e.g., mobile phones). The big.LITTLE multicore architecture, which contains high-performance cores (namely big core) and power-saved cores (namely little core), has been developed by ARM (Advanced RISC Machine) and Intel to trade off performance and power efficiency. Facing the new heterogeneous computing architecture, the traditional lock algorithms, which are designed to run on homogeneous computing architecture, cannot work optimally as usual and drop into the performance issue for the difference between big core and little core. In our preliminary experiment, we observed that, in the big.LITTLE multicore architecture, all these lock algorithms exhibit sub-optimal performance. The FIFO-based (First In First Out) locks experience throughput degradation, while the performance of competition-based locks can be divided into two categories. One of them is big-core-friendly, so their tail latency increases significantly; the other is little-core-friendly. Not only does the tail latency increase, but the throughput is also degraded. Motivated by this observation, we propose a Core-Aware Lock for the big.LITTLE multicore architecture named CAL, which keeps each core having an equal opportunity to access the critical section in the program. The core idea of the CAL is to take the slowdown ratio as the matric to reorder lock requests of these big and little cores. By evaluating benchmarks and a real-world application named LevelDB, CAL is confirmed to achieve fairness goals in heterogeneous computing architecture without sacrificing the performance of the big core. Compared to several traditional lock algorithms, the CAL’s fairness has increased by up to 67%; and Its throughput is 26% higher than FIFO-based locks and 53% higher than competition-based locks, respectively. In addition, the tail latency of CAL is always kept at a low level.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Parallel Computing and Optimization Techniques · Distributed systems and fault tolerance · Interconnection Networks and Systems

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

School of Computer Science and Technology, Xi’an Jiaotong University, Xi’an 710049, China

Funding

Shanghai Key Laboratory of Satellite Network · Shanghai Satellite Network Research Institute Co., Ltd

References (32)

Show source-provided references
1. Boyd-Wickizer, S., Kaashoek, M.F., Morris, R., and Zeldovich, N. (2012, January 27–31). Non-scalable locks are dangerous. Proceedings of the Linux Symposium, San Diego, CA, USA.
2. Dice, D. (2017, January 23–26). Malthusian locks. Proceedings of the Twelfth European Conference on Computer Systems, Belgrade, Serbia.10.1145/3064176.3064203 ↗
3. Fairness-aware energy efficient scheduling on heterogeneous multi-core processors10.1109/TC.2020.2984607 ↗
4. Mascitti, A., and Cucinotta, T. (2021, January 7–9). Dynamic Partitioned Scheduling of Real-Time DAG Tasks on ARM big. LITTLE Architectures. Proceedings of the 29th International Conference on Real-Time Networks and Systems, Nantes, France.10.1145/3453417.3453442 ↗
5. Tavakkol, A., Sadrosadati, M., Ghose, S., Kim, J., Luo, Y., Wang, Y., Ghiasi, N.M., Orosa, L., Gómez-Luna, J., and Mutlu, O. (2018, January 1–6). FLIN: Enabling fairness and enhancing performance in modern NVMe solid state drives. Proceedings of the 2018 ACM/IEEE 45th Annual International Symposium on Computer Architecture (ISCA), Los Angeles, CA, USA.10.1109/ISCA.2018.00041 ↗
6. Dice, D. (2011, January 4–6). Brief announcement: A partitioned ticket lock. Proceedings of the Twenty-Third Annual ACM Symposium on Parallelism in Algorithms and Architectures, New York, NY, USA.10.1145/1989493.1989543 ↗
7. Craig, T. (1993). Building FIFO and Priorityqueuing Spin Locks from Atomic Swap, Department of Computer Science, University of Washington. Technical Report, Technical Report TR 93-02-02.
8. The performance of spin lock alternatives for shared-memory multiprocessors10.1109/71.80120 ↗
9. Scott, M.L. (2013). Shared-Memory Synchronization, Morgan & Claypool Publishers.10.1007/978-3-031-01740-7 ↗
10. Lock cohorting: A general technique for designing NUMA locks10.1145/2370036.2145848 ↗
11. High performance locks for multi-level NUMA systems10.1145/2858788.2688503 ↗
12. Kashyap, S., Min, C., and Kim, T. (2017, January 12–14). Scalable {NUMA-aware} Blocking Synchronization Primitives. Proceedings of the 2017 USENIX Annual Technical Conference (USENIX ATC 17), Santa Clara, CA, USA.
13. Liu, N., Gu, J., Tang, D., Li, K., Zang, B., and Chen, H. (2022, January 2–6). Asymmetry-aware scalable locking. Proceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, Seoul, Republic of Korea.10.1145/3503221.3508420 ↗
14. Guiroux, H., Lachaize, R., and Quéma, V. (2016, January 22–24). Multicore Locks: The Case Is Not Closed Yet. Proceedings of the USENIX Annual Technical Conference, Denver, CO, USA.
15. Kashyap, S., Calciu, I., Cheng, X., Min, C., and Kim, T. (2019, January 27–30). Scalable and practical locking with shuffling. Proceedings of the 27th ACM Symposium on Operating Systems Principles, Huntsville, ON, Canada.10.1145/3341301.3359629 ↗
16. Dice, D., and Kogan, A. (2019, January 25–28). Compact NUMA-aware locks. Proceedings of the Fourteenth EuroSys Conference 2019, Dresden, Germany.10.1145/3302424.3303984 ↗
17. Lock–unlock: Is that all? a pragmatic analysis of locking in software systems10.1145/3301501 ↗
18. de Lima Chehab, R.L., Paolillo, A., Behrens, D., Fu, M., Härtig, H., and Chen, H. (2021, January 26–29). Clof: A compositional lock framework for multi-level numa systems. Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles, Virtual Event.
19. Guiroux, H. (2018). Understanding the Performance of Mutual Exclusion Algorithms on Modern Multicore Machines. [Ph.D. Thesis, Université Grenoble Alpes].
20. Hendler, D., Incze, I., Shavit, N., and Tzafrir, M. (2010, January 13–15). Flat combining and the synchronization-parallelism tradeoff. Proceedings of the Twenty-Second Annual ACM Symposium on Parallelism in Algorithms and Architectures, Thira Santorini, Greece.10.1145/1810479.1810540 ↗
21. Synchronization with eventcounts and sequencers10.1145/359060.359076 ↗
22. What is PTHREAD_MUTEX_ADAPTIVE_NP
23. Algorithms for scalable synchronization on shared-memory multiprocessors10.1145/103727.103729 ↗
24. Sanjay Ghemawat, J.D. (2024, July 17). LevelDB. Available online: https://github.com/google/leveldb.
25. Radovic, Z., and Hagersten, E. (2003, January 12). Hierarchical backoff locks for nonuniform communication architectures. Proceedings of the Ninth International Symposium on High-Performance Computer Architecture, Anaheim, CA, USA. HPCA-9.
26. Fast and portable locking for multicore architectures10.1145/2845079 ↗
27. Roghanchi, S., Eriksson, J., and Basu, N. (2017, January 28). Ffwd: Delegation is (much) faster than you think. Proceedings of the 26th Symposium on Operating Systems Principles, Shanghai, China.10.1145/3132747.3132771 ↗
28. Empirical studies of competitve spinning for a shared-memory multiprocessor10.1145/121133.286599 ↗
29. Nonblocking Algorithms and Scalable Multicore Programming: Exploring some alternatives to lock-based synchronization10.1145/2488364.2492433 ↗
30. Harris, T.L. (2001). A pragmatic implementation of non-blocking linked-lists. International Symposium on Distributed Computing, Springer.10.1007/3-540-45414-4_21 ↗
31. Performance of memory reclamation for lockless synchronization10.1016/j.jpdc.2007.04.010 ↗
32. Michael, M.M. (2002, January 10–13). High performance dynamic lock-free hash tables and list-based sets. Proceedings of the Fourteenth Annual ACM Symposium on Parallel Algorithms and Architectures, Winnipeg, MB, Canada.10.1145/564870.564881 ↗