Skip to content

Commit

Permalink
fix: 先进行fas再比较
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow3aaa committed Nov 27, 2024
1 parent ffaca27 commit 346a422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpu_common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ impl Controller {
let usage_tracking_sugg_freq = (cpu.cur_freq as f32 * cpu_usage / 100.0 / 0.5) as isize; // target_usage: 50%
let policy_freq = cpu
.cur_freq
.min(usage_tracking_sugg_freq)
.saturating_add(control)
.min(usage_tracking_sugg_freq)
.clamp(0, self.max_freq);
#[cfg(debug_assertions)]
debug!("policy{} freq: {}", cpu.policy, policy_freq);
Expand Down

0 comments on commit 346a422

Please sign in to comment.