On 2021/3/8 16:53, Peter Zijlstra wrote:
Still, it calling atomic_switch_perf_msrs() and intel_pmu_lbr_is_enabled() when there isn't a PMU at all is of course, a complete waste of cycles.
This suggestion is reminiscent of a sad regression of optimizing it: https://lore.kernel.org/kvm/20200619094046.654019-1-vkuznets@xxxxxxxxxx/ https://lore.kernel.org/kvm/20210209225653.1393771-1-jmattson@xxxxxxxxxx/