lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 5 Nov 2010 11:19:51 -0400
From:	Youquan Song <youquan.song@...ux.intel.com>
To:	davej@...hat.com
Cc:	arjan@...ux.intel.com, venki@...gle.com, youquan.song@...el.com,
	cpufreq-list@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] cpufreq: Fix ondemand governor powersave_bias execution
	time misuse

Ondemand governor use powersave_bias tunable to do aggressive power save by
decrease CPU average frequency. The average frequency achieve by adjust low and
high frequency's execution time proportion during one sample time interval.  

Current kernel, only the high frequency executes in time proportion, but the low
frequency wrongly execute in one whole sample time interval when powersave_bias
is set.  

The patch fix it by set low frequency execution time to it deserved. 

Signed-off-by: Youquan Song <youquan.song@...el.com>
---

diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index c631f27..01d84fa 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -666,6 +666,8 @@ static void do_dbs_timer(struct work_struct *work)
 	} else {
 		__cpufreq_driver_target(dbs_info->cur_policy,
 			dbs_info->freq_lo, CPUFREQ_RELATION_H);
+		if (dbs_info->sample_type == DBS_SUB_SAMPLE)
+			delay = dbs_info->freq_lo_jiffies;
 	}
 	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
 	mutex_unlock(&dbs_info->timer_mutex);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ