diff options
author | Yaxiong Tian <tianyaxiong@kylinos.cn> | 2025-09-12 15:35:02 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-09-19 23:21:01 +0200 |
commit | 02d09026a88f227aa1f4687bd31d6ffc4970e8be (patch) | |
tree | e82f742f81744acf671b2bc8247158f70df573f1 /rust/kernel/alloc.rs | |
parent | 7c0dde86c17665cb27e1c8dd23d263e2ed2d5b50 (diff) |
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>
Diffstat (limited to 'rust/kernel/alloc.rs')
0 files changed, 0 insertions, 0 deletions