From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933100AbcCIP3v (ORCPT ); Wed, 9 Mar 2016 10:29:51 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:34142 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932983AbcCIP3l (ORCPT ); Wed, 9 Mar 2016 10:29:41 -0500 Date: Wed, 9 Mar 2016 16:29:34 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" 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 Subject: Re: [PATCH v2 1/10] cpufreq: Reduce cpufreq_update_util() overhead a bit Message-ID: <20160309152934.GO6356@twins.programming.kicks-ass.net> References: <2495375.dFbdlAZmA6@vostro.rjw.lan> <2409306.qzzMXcm4dm@vostro.rjw.lan> <1988425.XTpZIAJINa@vostro.rjw.lan> <20160309123956.GM6356@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 09, 2016 at 03:17:48PM +0100, Rafael J. Wysocki wrote: > > That said, how about the below? It avoids a function call. > > That is fine by me. > > What about taking it a bit further, though, and moving the definition > of cpufreq_update_util_data to somewhere under kernel/sched/ (like > kernel/sched/cpufreq.c maybe)? > > Then, the whole static inline void cpufreq_update_util() definition > can go into kernel/sched/sched.h (it doesn't have to be visible > anywhere beyond kernel/sched/) and the only thing that needs to be > exported to cpufreq will be a helper (or two), to set/clear the > cpufreq_update_util_data pointers. > > I'll try to cut a patch doing that later today for illustration. Right, that's a blend with your second patch. Sure.