From patchwork Fri Sep 14 04:04:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Pecio X-Patchwork-Id: 1455291 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C694BDF280 for ; Fri, 14 Sep 2012 04:05:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750825Ab2INEFB (ORCPT ); Fri, 14 Sep 2012 00:05:01 -0400 Received: from hqemgate03.nvidia.com ([216.228.121.140]:17211 "EHLO hqemgate03.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771Ab2INEFA convert rfc822-to-8bit (ORCPT ); Fri, 14 Sep 2012 00:05:00 -0400 Received: from hqnvupgp05.nvidia.com (Not Verified[216.228.121.13]) by hqemgate03.nvidia.com id ; Thu, 13 Sep 2012 21:06:33 -0700 Received: from hqemhub02.nvidia.com ([172.17.108.22]) by hqnvupgp05.nvidia.com (PGP Universal service); Thu, 13 Sep 2012 21:04:01 -0700 X-PGP-Universal: processed; by hqnvupgp05.nvidia.com on Thu, 13 Sep 2012 21:04:01 -0700 Received: from HQMAIL04.nvidia.com ([172.20.150.118]) by hqemhub02.nvidia.com ([172.20.150.31]) with mapi; Thu, 13 Sep 2012 21:04:54 -0700 From: Michal Pecio To: "Rafael J. Wysocki" CC: "cpufreq@vger.kernel.org" , "linux-pm@vger.kernel.org" , Thomas Renninger Date: Thu, 13 Sep 2012 21:04:54 -0700 Subject: [PATCHv2 1/2] cpufreq: ondemand: update frequency when limits are relaxed Thread-Topic: [PATCHv2 1/2] cpufreq: ondemand: update frequency when limits are relaxed Thread-Index: Ac2SKbavG//1fnFSQDOx6z+l7KHiWw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Michal Pecio Reevaluate CPU load and update frequency immediately whenever limits are changed. Currently ondemand doesn't do that when limits are relaxed, wasting power on systems with relatively low sampling rate. Signed-off-by: Michal Pecio --- Basically the same as before, but this time frequency is pushed back into limits (if needed) before calling dbs_check_cpu. drivers/cpufreq/cpufreq_ondemand.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 1aaf7af..4616706 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -760,6 +760,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, else if (policy->min > this_dbs_info->cur_policy->cur) __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; }