High-Resolution Timekeeping in the Linux Kernel: A Comprehensive Analysis
Abstract
This article provides an overview of high-resolution timekeeping in the Linux kernel. We look into the transition from periodic tick-based timekeeping, through high-resolution timers(hrtimers; proposed to improve precision and accuracy), dynamic ticks (where period boundaries are dynamically adjusted based on workload) and HPET (a breakthrough in timekeeping capacity). The reasons for these developments, how they are implemented and the effects on system performance and power efficiency are presented in this study. We then dive into some of the challenges and trade-offs that come with various approaches to timekeeping, especially as they pertain to real-time and high-throughput compute workloads. Abstract More than a handful of subsystems are involved with keeping time on a Linux system, and their various interactions can have wide-ranging effects on system functionality.