Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935841AbcCQL3n (ORCPT ); Thu, 17 Mar 2016 07:29:43 -0400 Received: from foss.arm.com ([217.140.101.70]:47654 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932876AbcCQL3j (ORCPT ); Thu, 17 Mar 2016 07:29:39 -0400 Date: Thu, 17 Mar 2016 11:30:54 +0000 From: Juri Lelli To: "Rafael J. Wysocki" Cc: Linux PM list , Peter Zijlstra , Steve Muckle , ACPI Devel Maling List , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Vincent Guittot , Michael Turquette , Ingo Molnar Subject: Re: [PATCH v5 7/7][Update] cpufreq: schedutil: New governor based on scheduler utilization data Message-ID: <20160317113054.GG18212@e106622-lin> References: <2495375.dFbdlAZmA6@vostro.rjw.lan> <4088601.C2vItRYpQn@vostro.rjw.lan> <1711281.bPmSjlBT7c@vostro.rjw.lan> <18957412.GBWZqUOZtk@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18957412.GBWZqUOZtk@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1135 Lines: 45 Hi Rafael, On 17/03/16 01:01, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki [...] > +static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time, > + unsigned int next_freq) > +{ > + struct cpufreq_policy *policy = sg_policy->policy; > + > + sg_policy->last_freq_update_time = time; > + > + if (policy->fast_switch_enabled) { > + if (next_freq > policy->max) > + next_freq = policy->max; > + else if (next_freq < policy->min) > + next_freq = policy->min; > + > + if (sg_policy->next_freq == next_freq) { > + trace_cpu_frequency(policy->cur, smp_processor_id()); > + return; > + } > + sg_policy->next_freq = next_freq; > + next_freq = cpufreq_driver_fast_switch(policy, next_freq); > + if (next_freq == CPUFREQ_ENTRY_INVALID) > + return; > + > + policy->cur = next_freq; > + trace_cpu_frequency(next_freq, smp_processor_id()); > + } else if (sg_policy->next_freq != next_freq) { > + sg_policy->work_cpu = smp_processor_id(); + sg_policy->next_freq = next_freq; > + irq_work_queue(&sg_policy->irq_work); > + } > +} Or we remain at max_f :-). Best, - Juri