From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757354AbcCCLRE (ORCPT ); Thu, 3 Mar 2016 06:17:04 -0500 Received: from casper.infradead.org ([85.118.1.10]:34598 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751572AbcCCLRC (ORCPT ); Thu, 3 Mar 2016 06:17:02 -0500 Date: Thu, 3 Mar 2016 12:16:55 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: Linux PM list , Juri Lelli , Steve Muckle , ACPI Devel Maling List , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Vincent Guittot , Michael Turquette Subject: Re: [PATCH 5/6] cpufreq: Support for fast frequency switching Message-ID: <20160303111655.GL6356@twins.programming.kicks-ass.net> References: <2495375.dFbdlAZmA6@vostro.rjw.lan> <26020775.9hJG2SHiH2@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26020775.9hJG2SHiH2@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 02, 2016 at 03:12:33AM +0100, Rafael J. Wysocki wrote: > The most important change from the previous version is that the > ->fast_switch() callback takes an additional "relation" argument > and now the governor can use it to choose a selection method. > +unsigned int acpi_cpufreq_fast_switch(struct cpufreq_policy *policy, > + unsigned int target_freq, > + unsigned int relation) Would it make sense to replace the {target_freq, relation} pair with something like the CPPC {min_freq, max_freq} pair? Then you could use the closest frequency to max provided it is larger than min. This communicates more actual information in the same number of parameters and would thereby allow for a more flexible (better) frequency selection.