From 346a422745bdf5ec6a0ebfa8e63543a485ffd539 Mon Sep 17 00:00:00 2001 From: shadow3aaa Date: Wed, 27 Nov 2024 22:04:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=88=E8=BF=9B=E8=A1=8Cfas=E5=86=8D?= =?UTF-8?q?=E6=AF=94=E8=BE=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cpu_common/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu_common/mod.rs b/src/cpu_common/mod.rs index 55d7085..a741a70 100644 --- a/src/cpu_common/mod.rs +++ b/src/cpu_common/mod.rs @@ -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);