Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934364AbcCPQ64 (ORCPT ); Wed, 16 Mar 2016 12:58:56 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34496 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932079AbcCPQ6y (ORCPT ); Wed, 16 Mar 2016 12:58:54 -0400 MIME-Version: 1.0 In-Reply-To: <20160316153550.GA6344@twins.programming.kicks-ass.net> References: <1711281.bPmSjlBT7c@vostro.rjw.lan> <1989596.XAKfhFj1lz@vostro.rjw.lan> <20160316153550.GA6344@twins.programming.kicks-ass.net> Date: Wed, 16 Mar 2016 17:58:52 +0100 X-Google-Sender-Auth: 0-1ssQDfuoDNfDzl_9r2hm6H5ko Message-ID: Subject: Re: [PATCH v4 6/7] cpufreq: Support for fast frequency switching From: "Rafael J. Wysocki" To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Linux PM list , Juri Lelli , 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: 964 Lines: 27 On Wed, Mar 16, 2016 at 4:35 PM, Peter Zijlstra wrote: > On Wed, Mar 16, 2016 at 03:52:28PM +0100, Rafael J. Wysocki wrote: >> +/** >> + * cpufreq_enable_fast_switch - Enable fast frequency switching for policy. >> + * @policy: cpufreq policy to enable fast frequency switching for. >> + * >> + * Try to enable fast frequency switching for @policy. >> + * >> + * The attempt will fail if there is at least one transition notifier registered >> + * at this point, as fast frequency switching is quite fundamentally at odds >> + * with transition notifiers. Thus if successful, it will make registration of >> + * transition notifiers fail going forward. >> + * >> + * Call under policy->rwsem. > > Nobody reads a comment.. > >> + */ >> +void cpufreq_enable_fast_switch(struct cpufreq_policy *policy) >> +{ > > lockdep_assert_held(&policy->rwsem); > > While everybody complains when there's a big nasty splat in their dmesg > ;-) OK