Reliable and Efficient Performance Monitoring in Linux
SessionPerformance Measurement and Analysis
Session ChairPeter Beckman
Authors
Event Type
Paper
Advanced
Performance
Location355-BC
DescriptionProcessor hardware performance counters have advanced in quality and features in recent years. At the same time, performance monitoring support in Linux has been significantly revamped with the development of the perf_events subsystem. These factors result in making performance monitoring a more common practice among developers. However, no performance analysis is possible without reliable hardware counter data. In this paper, we focus on a published correctness erratum in the performance counters of recent prevalent processors with Simultaneous Multithreading (SMT). This erratum causes cross-thread hardware counter corruption and may produce unreliable performance data. We propose a cache-coherence style protocol to circumvent the issue by introducing cross-thread dynamic event scheduling. We also introduce a better scheduling algorithm that achieves the optimal scheduling of events onto hardware counters at all times. The proposed optimizations do not require any user level changes. The improvements have been contributed to the upstream Linux kernel 4.1.












