From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934693AbcCJCMo (ORCPT ); Wed, 9 Mar 2016 21:12:44 -0500 Received: from mail-lb0-f178.google.com ([209.85.217.178]:32769 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbcCJCMd (ORCPT ); Wed, 9 Mar 2016 21:12:33 -0500 MIME-Version: 1.0 In-Reply-To: <20160309123539.GL6356@twins.programming.kicks-ass.net> References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <2044559.7ypXocW9OZ@vostro.rjw.lan> <3499355.2JlaSruvOa@vostro.rjw.lan> <16016177.YFqb4gVNBo@vostro.rjw.lan> <20160309123539.GL6356@twins.programming.kicks-ass.net> From: Vincent Guittot Date: Thu, 10 Mar 2016 09:12:12 +0700 Message-ID: Subject: Re: [PATCH v10 1/3] cpufreq: Add mechanism for registering utilization update callbacks To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Linux PM list , Ingo Molnar , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Juri Lelli , Steve Muckle , Thomas Gleixner 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 9 March 2016 at 19:35, Peter Zijlstra wrote: > On Mon, Feb 15, 2016 at 10:47:22PM +0100, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> Introduce a mechanism by which parts of the cpufreq subsystem >> ("setpolicy" drivers or the core) can register callbacks to be >> executed from cpufreq_update_util() which is invoked by the >> scheduler's update_load_avg() on CPU utilization changes. >> >> This allows the "setpolicy" drivers to dispense with their timers >> and do all of the computations they need and frequency/voltage >> adjustments in the update_load_avg() code path, among other things. >> >> The update_load_avg() changes were suggested by Peter Zijlstra. >> >> Signed-off-by: Rafael J. Wysocki >> Acked-by: Viresh Kumar >> --- >> drivers/cpufreq/cpufreq.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ >> include/linux/cpufreq.h | 34 ++++++++++++++++++++++++++++++++++ >> kernel/sched/deadline.c | 4 ++++ >> kernel/sched/fair.c | 26 +++++++++++++++++++++++++- >> kernel/sched/rt.c | 4 ++++ >> kernel/sched/sched.h | 1 + >> 6 files changed, 113 insertions(+), 1 deletion(-) >> > > So with the understanding that we'll work on getting rid of > cpufreq_trigger_update(). > > Acked-by: Peter Zijlstra (Intel) > > Also, Vincent had some concerns about the exact placement of the > callback, and I see no problem in moving it if there's need. Yes, as explained previously we can probably use other placement to not miss any immediate change of rq's utilization because of task migration but this optimization can probably be done in a next step > -- > To unsubscribe from this list: send the line "unsubscribe linux-pm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html