cpufreq: intel_pstate: Use likely() optimization in intel_pstate_sample()
The comment above the condition `if (cpu->last_sample_time)` clearly indicates that the branch is taken for the vast majority of invocations after the first sample in a cycle. The first sample is a one-time initialization case. Add likely() hint to the condition to improve branch prediction for this performance-critical path in intel_pstate_sample(). Signed-off-by:Yaxiong Tian <tianyaxiong@kylinos.cn> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Loading
Please sign in to comment