The fastest Linux timestamps
Summary
The article analyzes Linux timer internals (TSC and vDSO) and benchmarks strategies to reduce timestamp overhead on x86 Linux for low latency tracing. It introduces multiple timer implementations, including a vDSO bypass and cached variants, showing substantial median gains but also tail latency challenges and maintenance risks when kernel data layouts change. It concludes with guidance on choosing robust approaches for production tracing.