Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932867AbcCOVdY (ORCPT ); Tue, 15 Mar 2016 17:33:24 -0400 Received: from casper.infradead.org ([85.118.1.10]:38919 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750701AbcCOVdU (ORCPT ); Tue, 15 Mar 2016 17:33:20 -0400 Date: Tue, 15 Mar 2016 22:32:53 +0100 From: Peter Zijlstra To: Michael Turquette Cc: Dietmar Eggemann , rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Juri.Lelli@arm.com, steve.muckle@linaro.org, morten.rasmussen@arm.com, vincent.guittot@linaro.org, Michael Turquette Subject: Re: [PATCH 7/8] cpufreq: Frequency invariant scheduler load-tracking support Message-ID: <20160315213253.GH6344@twins.programming.kicks-ass.net> References: <1457932932-28444-1-git-send-email-mturquette+renesas@baylibre.com> <1457932932-28444-8-git-send-email-mturquette+renesas@baylibre.com> <56E85EEA.5000604@arm.com> <20160315201917.30639.2415@quark.deferred.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160315201917.30639.2415@quark.deferred.io> 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 Content-Length: 644 Lines: 14 On Tue, Mar 15, 2016 at 01:19:17PM -0700, Michael Turquette wrote: > That's what I had in mind. I guess that some day there will be a need to > select implementations at run-time for both cpufreq (e.g. different > cpufreq drivers might implement arch_scale_freq_capacity) and for the > !CONFIG_CPU_FREQ case (e.g. different platforms might implement > arch_scale_freq_capcity within the same arch). No, no runtime selection. That gets us function pointers and other indirect mess. We should be trying very hard to get rid of that cpufreq_util_update() pointer, not add more of that gunk. Use self modifying code if you have to do something.