Commit 02d09026 authored by Yaxiong Tian's avatar Yaxiong Tian Committed by Rafael J. Wysocki
Browse files

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: default avatarYaxiong Tian <tianyaxiong@kylinos.cn>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 7c0dde86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment