From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932468AbcBWBbP (ORCPT ); Mon, 22 Feb 2016 20:31:15 -0500 Received: from mail-lb0-f178.google.com ([209.85.217.178]:33161 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932253AbcBWBbL (ORCPT ); Mon, 22 Feb 2016 20:31:11 -0500 MIME-Version: 1.0 In-Reply-To: <1456190570-4475-3-git-send-email-smuckle@linaro.org> References: <1456190570-4475-1-git-send-email-smuckle@linaro.org> <1456190570-4475-3-git-send-email-smuckle@linaro.org> Date: Tue, 23 Feb 2016 02:31:09 +0100 X-Google-Sender-Auth: 2quz-cplxHsyq4LJM4LY3zMGYWU Message-ID: Subject: Re: [RFCv7 PATCH 02/10] cpufreq: introduce cpufreq_driver_is_slow From: "Rafael J. Wysocki" To: Steve Muckle Cc: Peter Zijlstra , Ingo Molnar , "Rafael J. Wysocki" , Linux Kernel Mailing List , "linux-pm@vger.kernel.org" , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Juri Lelli , Patrick Bellasi , Michael Turquette , Viresh Kumar Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 23, 2016 at 2:22 AM, Steve Muckle wrote: > From: Michael Turquette > > Some architectures and platforms perform CPU frequency transitions > through a non-blocking method, while some might block or sleep. Even > when frequency transitions do not block or sleep they may be very slow. > This distinction is important when trying to change frequency from > a non-interruptible context in a scheduler hot path. > > Describe this distinction with a cpufreq driver flag, > CPUFREQ_DRIVER_FAST. The default is to not have this flag set, > thus erring on the side of caution. > > cpufreq_driver_is_slow() is also introduced in this patch. Setting > the above flag will allow this function to return false. > > [smuckle@linaro.org: change flag/API to include drivers that are too > slow for scheduler hot paths, in addition to those that block/sleep] > > Cc: Rafael J. Wysocki > Cc: Viresh Kumar > Signed-off-by: Michael Turquette > Signed-off-by: Steve Muckle Something more sophisticated than this is needed, because one driver may actually be able to do "fast" switching in some cases and may not be able to do that in other cases. For example, in the acpi-cpufreq case all depends on what's there in the ACPI tables. Thanks, Rafael