BPF Hybrid Lock: Using eBPF to communicate with the scheduler - Inria - Institut national de recherche en sciences et technologies du numérique
Rapport (Rapport Contrat/Projet) Année : 2023

BPF Hybrid Lock: Using eBPF to communicate with the scheduler

Résumé

Multi-core processors have long been available, yet harnessing their full computing potential remains a challenge due to synchronization issues that impact performance. This work addresses the dilemma of choosing between spin locks, known for their responsiveness but prone to collapse in over-subscribed systems, and blocking locks, which are stable but less reactive. We introduce the BPF Hybrid Lock, a novel synchronization technique that dynamically transitions between spin locks and blocking locks based on system subscription. eBPF is used to detect lock holder preemptions. Our contributions include algorithms for seamless lock transitions, enhanced condition variable reactivity, and detection of the optimal time to switch from a spin lock to a blocking lock. We provide an implementation of the BPF Hybrid Lock using MCS and Linux Futex locks, showcasing performance improvements in under-subscribed systems, such as LevelDB, where write operation times decreased from 282 to 102µs and read times from 40 to 25µs.
Fichier principal
Vignette du fichier
BPF_Hybrid_Locks_Internship_report.pdf (4.78 Mo) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04266815 , version 1 (31-10-2023)

Licence

Identifiants

  • HAL Id : hal-04266815 , version 1

Citer

Victor Laforet, Jean-Pierre Lozi, Julia Lawall. BPF Hybrid Lock: Using eBPF to communicate with the scheduler. Inria; Institut Polytechnique de Paris. 2023. ⟨hal-04266815v1⟩
89 Consultations
139 Téléchargements

Partager

More