Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753093Ab3F0Jgq (ORCPT ); Thu, 27 Jun 2013 05:36:46 -0400 Received: from mail-oa0-f53.google.com ([209.85.219.53]:35470 "EHLO mail-oa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093Ab3F0Jgn (ORCPT ); Thu, 27 Jun 2013 05:36:43 -0400 MIME-Version: 1.0 In-Reply-To: <1371661969-7660-6-git-send-email-l.majewski@samsung.com> References: <1370502472-7249-1-git-send-email-l.majewski@samsung.com> <1371661969-7660-1-git-send-email-l.majewski@samsung.com> <1371661969-7660-6-git-send-email-l.majewski@samsung.com> Date: Thu, 27 Jun 2013 15:06:43 +0530 Message-ID: Subject: Re: [PATCH v4 5/7] cpufreq: Calculate number of busy CPUs From: Viresh Kumar To: Lukasz Majewski Cc: "Rafael J. Wysocky" , "cpufreq@vger.kernel.org" , Linux PM list , Vincent Guittot , Jonghwa Lee , Myungjoo Ham , linux-kernel , Lukasz Majewski , Andre Przywara , Daniel Lezcano , Kukjin Kim , Zhang Rui , Eduardo Valentin Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1511 Lines: 34 On 19 June 2013 22:42, Lukasz Majewski wrote: > In the core governor code, per cpu load value is calculated. This patch > uses it to mark processor as a "busy" one, when load value is higher than > 90%. How can we take this assumption. What about a cpu which is only 70-80% busy? So, we would be running at around 70% of policy->max.. Now at this point you want to enable boost frequency and so that will happen for all cores... Wouldn't that burn your chip? > New cpufreq sysfs attribute is created (busy_cpus). It is read only > and provides information about number of actually busy CPU. Not required. > diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c > index 077cea7..3402533 100644 > --- a/drivers/cpufreq/cpufreq_governor.c > +++ b/drivers/cpufreq/cpufreq_governor.c > @@ -148,6 +148,7 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu) > continue; > > load = 100 * (wall_time - idle_time) / wall_time; > + cpufreq_set_busy_cpu(j, load > 90 ? 1 : 0); do this only when boost is enabled. > if (dbs_data->cdata->governor == GOV_ONDEMAND) { > int freq_avg = __cpufreq_driver_getavg(policy, j); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/