From 2d175069f2b5477692d4bd7586bc530ffe8107bb Mon Sep 17 00:00:00 2001 From: Amit Daniel Kachhap Date: Mon, 13 Aug 2012 00:14:53 +0200 Subject: PM / cpufreq: Initialise the cpu field during conservative governor start This change initialises the cpu id field of cs_cpu_dbs_info structure in conservative governor and keep this consistent with other governors. Similar initialisation is present in ondemand governor. Signed-off-by: Amit Daniel Kachhap Signed-off-by: Rafael J. Wysocki --- drivers/cpufreq/cpufreq_conservative.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/cpufreq/cpufreq_conservative.c') diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 235a340..a1563d7 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -504,6 +504,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, j_dbs_info->prev_cpu_nice = kcpustat_cpu(j).cpustat[CPUTIME_NICE]; } + this_dbs_info->cpu = cpu; this_dbs_info->down_skip = 0; this_dbs_info->requested_freq = policy->cur; -- cgit v1.1 From 2d8fced75cfa8c513ba1cbe682cb30207d941f2b Mon Sep 17 00:00:00 2001 From: Michal Pecio Date: Fri, 14 Sep 2012 21:07:48 +0200 Subject: cpufreq: conservative: update frequency when limits are relaxed Reevaluate CPU load and update frequency immediately whenever limits are changed. Currently conservative doesn't do that when limits are relaxed, wasting power on systems with relatively low sampling rate. Signed-off-by: Michal Pecio Reviewed-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki --- drivers/cpufreq/cpufreq_conservative.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/cpufreq/cpufreq_conservative.c') diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index a1563d7..b75dc2c 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -584,6 +584,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, __cpufreq_driver_target( this_dbs_info->cur_policy, policy->min, CPUFREQ_RELATION_L); + dbs_check_cpu(this_dbs_info); mutex_unlock(&this_dbs_info->timer_mutex); break; -- cgit v1.1