Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752987AbdFUAbb (ORCPT ); Tue, 20 Jun 2017 20:31:31 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60934 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752534AbdFUAba (ORCPT ); Tue, 20 Jun 2017 20:31:30 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D846E60913 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=skannan@codeaurora.org Message-ID: <5949BE5F.4020502@codeaurora.org> Date: Tue, 20 Jun 2017 17:31:27 -0700 From: Saravana Kannan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Viresh Kumar CC: Dietmar Eggemann , "linux-kernel@vger.kernel.org" , Linux PM list , Russell King , "linux-arm-kernel@lists.infradead.org" , Greg Kroah-Hartman , Russell King , Catalin Marinas , Will Deacon , Juri Lelli , Vincent Guittot , Peter Zijlstra , Morten Rasmussen Subject: Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant load-tracking support References: <20170608075513.12475-1-dietmar.eggemann@arm.com> <20170608075513.12475-3-dietmar.eggemann@arm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2513 Lines: 59 On 06/19/2017 11:17 PM, Viresh Kumar wrote: > On Thu, Jun 8, 2017 at 1:25 PM, Dietmar Eggemann > wrote: > >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > >> static int __init register_cpufreq_notifier(void) >> { >> + int ret; >> + >> /* >> * on ACPI-based systems we need to use the default cpu capacity >> * until we have the necessary code to parse the cpu capacity, so >> @@ -225,8 +265,14 @@ static int __init register_cpufreq_notifier(void) >> >> cpumask_copy(cpus_to_visit, cpu_possible_mask); >> >> - return cpufreq_register_notifier(&init_cpu_capacity_notifier, >> - CPUFREQ_POLICY_NOTIFIER); >> + ret = cpufreq_register_notifier(&init_cpu_capacity_notifier, >> + CPUFREQ_POLICY_NOTIFIER); > > Wanted to make sure that we all understand the constraints this is going to add > for the ARM64 platforms. > > With the introduction of this transition notifier, we would not be able to use > the fast-switch path in the schedutil governor. I am not sure if there are any > ARM platforms that can actually use the fast-switch path in future or not > though. The requirement of fast-switch path is that the freq can be changed > without sleeping in the hot-path. > > So, will we ever want fast-switching for ARM platforms ? > I don't think we should go down a path that'll prevent ARM platform from switching over to fast-switching in the future. Having said that, I'm not sure I fully agree with the decision to completely disable notifiers in the fast-switching case. How many of the current users of notifiers truly need support for sleeping in the notifier? Why not make all the transition notifiers atomic? Or at least add atomic transition notifiers that can be registered for separately if the client doesn't need the ability to sleep? Most of the clients don't seem like ones that'll need to sleep. There are a bunch of generic off-tree drivers (can't upstream them yet because it depends on the bus scaling framework) that also depend on CPUfreq transition notifiers that are going to stop working if fast switching becomes available in the future. So, this decision to disallow transition notifiers is painful for other reasons too. -Saravana -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project