Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752756AbcCGNmX (ORCPT ); Mon, 7 Mar 2016 08:42:23 -0500 Received: from mail-lb0-f196.google.com ([209.85.217.196]:35978 "EHLO mail-lb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbcCGNmN (ORCPT ); Mon, 7 Mar 2016 08:42:13 -0500 MIME-Version: 1.0 In-Reply-To: <20160307133203.GD6356@twins.programming.kicks-ass.net> References: <2409306.qzzMXcm4dm@vostro.rjw.lan> <15684081.T4iOMUSHCY@vostro.rjw.lan> <56DA09B1.4010005@linaro.org> <20160305164900.GX6356@twins.programming.kicks-ass.net> <20160307080059.GZ6356@twins.programming.kicks-ass.net> <20160307133203.GD6356@twins.programming.kicks-ass.net> Date: Mon, 7 Mar 2016 14:42:10 +0100 X-Google-Sender-Auth: 3ttt4D-IcCj3KK2mVt7rQve1paU Message-ID: Subject: Re: [PATCH v2 6/10] cpufreq: Support for fast frequency switching From: "Rafael J. Wysocki" To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Steve Muckle , "Rafael J. Wysocki" , Linux PM list , Juri Lelli , 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: 2129 Lines: 56 On Mon, Mar 7, 2016 at 2:32 PM, Peter Zijlstra wrote: > On Mon, Mar 07, 2016 at 02:15:47PM +0100, Rafael J. Wysocki wrote: >> On Mon, Mar 7, 2016 at 9:00 AM, Peter Zijlstra wrote: > >> > Sure I know all that. But that, to me, seems like an argument for why >> > you should have done this a long time ago. >> >> While I generally agree with this, I don't quite see why cleaning that >> up necessarily has to be connected to the current patch series which >> is my point. > > Ah OK, fair enough I suppose. But someone should stick this on their > TODO list, we should not 'forget' about this (again). Sure. >> > But I do think something wants to be done here. >> >> So here's what I can do for the "fast switch" thing. >> >> There is the fast_switch_possible policy flag that's necessary anyway. >> I can make notifier registration fail when that is set for at least >> one policy and I can make the setting of it fail if at least one >> notifier has already been registered. >> >> However, without spending too much time on chasing code dependencies i >> sort of suspect that it will uncover things that register cpufreq >> notifiers early and it won't be possible to use fast switch without >> sorting that out. > > The two x86 users don't register notifiers when CONSTANT_TSC, which > seems to be the right thing. > > Much of the other users seem unlikely to be used on x86, so I suspect > the initial fallout will be very limited. OK, let me try this then. > *groan* modules, cpufreq allows drivers to be modules, so init sequences > are poorly defined at best :/ Yes that blows. Yup. >> And that won't even change anything apart from >> removing some code that has not worked for quite a while already and >> nobody noticed. > > Which is always a good thing, but yes, we can do this later. > >> It is doable for the "fast switch" thing, but it won't help in all of >> the other cases when notifications are not reliable. > > Right, you can maybe add a 'NOTIFIERS_BROKEN' flag to the intel_p_state > and HWP drivers or so, and trigger off of that. Something like that, yes.