From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752936AbcGVAeM (ORCPT ); Thu, 21 Jul 2016 20:34:12 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36567 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbcGVAeJ (ORCPT ); Thu, 21 Jul 2016 20:34:09 -0400 From: Steve Muckle X-Google-Original-From: Steve Muckle Date: Thu, 21 Jul 2016 17:34:05 -0700 To: "Rafael J. Wysocki" Cc: Steve Muckle , "Rafael J. Wysocki" , Viresh Kumar , Lists linaro-kernel , Linux PM , Linux Kernel Mailing List , Peter Zijlstra , Ingo Molnar , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Juri Lelli , Patrick Bellasi Subject: Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index() Message-ID: <20160722003405.GZ27987@graphite.smuckle.net> References: <065301260510fbca81f5481b27b0de956073068a.1469137133.git.viresh.kumar@linaro.org> <1490801.bHMYROVPDC@vostro.rjw.lan> <20160721232228.GT27987@graphite.smuckle.net> <20160721234558.GX27987@graphite.smuckle.net> <20160722000903.GY27987@graphite.smuckle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 22, 2016 at 02:18:54AM +0200, Rafael J. Wysocki wrote: > > My thinking was that one of these two would be preferable: > > > > - Forcing ->target() drivers to install a ->resolve_freq callback, > > enforcing this at cpufreq driver init time. > > That would have been possible, but your series didn't do that. > > > My understanding is > > ->target() drivers are deprecated anyway > > No, they aren't. Ok. I didn't follow Documentation/cpu-freq/cpu-drivers.txt section 1.5 then - it suggests something about target() is deprecated, perhaps it's out of date. > There simply are cases in which frequency tables are not workable > (like the ACPI CPPC one). Sure that makes sense. > > and theren't aren't many of > > them, though I don't know offhand exactly how many or how hard it > > would be to do for each one. > > > > - Forcing callers (schedutil in this case) to check that either > > ->target() or ->resolve_freq() is implemented. It means > > catching and scrutinizing future callers of resolve_freq. > > But that doesn't reduce the number of checks in cpufreq_driver_resolve_freq(). > > There still are three choices in there: return a frequency from the > table (if present), or call ->resolve_freq (if implemented), or return > target_freq (as the last resort). Sorry, that should've been "check that either ->target_index() or ->resolve_freq() is implemented." Implementing resolve_freq for the target() drivers and requiring it at driver init time is probably the better way to go though. Perhaps I can work on this at some point.