Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754496AbdGJPSB (ORCPT ); Mon, 10 Jul 2017 11:18:01 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36898 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754480AbdGJPR7 (ORCPT ); Mon, 10 Jul 2017 11:17:59 -0400 Subject: Re: [PATCH v2 10/10] drivers base/arch_topology: inline cpu- and frequency-invariant accounting To: Viresh Kumar Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux@arm.linux.org.uk, Greg Kroah-Hartman , Russell King , Catalin Marinas , Will Deacon , Juri Lelli , Vincent Guittot , Peter Zijlstra , Morten Rasmussen , "Rafael J . Wysocki" References: <20170706094948.8779-1-dietmar.eggemann@arm.com> <20170706094948.8779-11-dietmar.eggemann@arm.com> <20170706105753.GA1523@vireshk-i7> From: Dietmar Eggemann Message-ID: <80be7145-99c3-b13b-ae2e-0ce6e4623da0@arm.com> Date: Mon, 10 Jul 2017 16:17:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170706105753.GA1523@vireshk-i7> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1232 Lines: 32 On 06/07/17 11:57, Viresh Kumar wrote: > Sure this patch looks pretty useful, but ... > > On 06-07-17, 10:49, Dietmar Eggemann wrote: >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c >> index 63fb3f945d21..b4481cff14bf 100644 >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c >> @@ -22,12 +22,7 @@ >> #include >> #include >> >> -static DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; >> - >> -unsigned long topology_get_freq_scale(struct sched_domain *sd, int cpu) >> -{ >> - return per_cpu(freq_scale, cpu); >> -} >> +DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; > > ... you just undo what you did earlier in this series, and that is somewhat > discouraged. > > What about making this as the first patch of the series and move only the below > part to the header. And then you can add the above part to the right place in > the first attempt itself? > > But maybe this is all okay :) I just wanted to show people what we gain in completely inlining FIE and CIE on ARM64 in the scheduler hot-path. But yes, with the next version I want to fold this inlining into the actual FIE/CIE patch.