Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030788AbcCQMyN (ORCPT ); Thu, 17 Mar 2016 08:54:13 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33049 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030770AbcCQMyI (ORCPT ); Thu, 17 Mar 2016 08:54:08 -0400 MIME-Version: 1.0 In-Reply-To: <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> <20160317113054.GG18212@e106622-lin> Date: Thu, 17 Mar 2016 13:54:05 +0100 X-Google-Sender-Auth: Xrz-CrPFAsC7hlr_nmERTFxn-H0 Message-ID: Subject: Re: [PATCH v5 7/7][Update] cpufreq: schedutil: New governor based on scheduler utilization data From: "Rafael J. Wysocki" To: Juri Lelli Cc: "Rafael J. Wysocki" , 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1539 Lines: 49 On Thu, Mar 17, 2016 at 12:30 PM, Juri Lelli wrote: > 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; > Doh. >> + irq_work_queue(&sg_policy->irq_work); >> + } >> +} > > Or we remain at max_f :-). Sure, thanks! Will fix.