From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932780AbcESTql (ORCPT ); Thu, 19 May 2016 15:46:41 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35722 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932202AbcESTqj (ORCPT ); Thu, 19 May 2016 15:46:39 -0400 From: Steve Muckle X-Google-Original-From: Steve Muckle Date: Thu, 19 May 2016 12:46:35 -0700 To: "Rafael J. Wysocki" Cc: Steve Muckle , Peter Zijlstra , Ingo Molnar , Linux Kernel Mailing List , "linux-pm@vger.kernel.org" , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Juri Lelli , Patrick Bellasi , Michael Turquette , Viresh Kumar , Srinivas Pandruvada , Len Brown Subject: Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged Message-ID: <20160519194635.GG17223@graphite.smuckle.net> References: <1462828814-32530-1-git-send-email-smuckle@linaro.org> <1462828814-32530-6-git-send-email-smuckle@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 19, 2016 at 01:44:36AM +0200, Rafael J. Wysocki wrote: > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle wrote: > > The rate limit timestamp (last_freq_update_time) is currently advanced > > anytime schedutil re-evaluates the policy regardless of whether the CPU > > frequency is changed or not. This means that utilization updates which > > have no effect can cause much more significant utilization updates > > (which require a large increase or decrease in CPU frequency) to be > > delayed due to rate limiting. > > > > Instead only update the rate limiting timstamp when the requested > > target-supported frequency changes. The rate limit will now apply to > > the rate of CPU frequency changes rather than the rate of > > re-evaluations of the policy frequency. > > > > Signed-off-by: Steve Muckle > > I'm sort of divided here to be honest. It is true that this means we'll do more frequency re-evaluations, they will occur until an actual frequency change is requested. But the way it stands now, with a system's typical background activity there are so many minor events that it is very common for throttling to be in effect, causing major events to be ignored. > > > --- > > kernel/sched/cpufreq_schedutil.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c > > index e185075fcb5c..4d2907c8a142 100644 > > --- a/kernel/sched/cpufreq_schedutil.c > > +++ b/kernel/sched/cpufreq_schedutil.c > > @@ -117,12 +117,11 @@ static void sugov_update_commit(struct sugov_cpu *sg_cpu, int cpu, u64 time, > > struct sugov_policy *sg_policy = sg_cpu->sg_policy; > > struct cpufreq_policy *policy = sg_policy->policy; > > > > - sg_policy->last_freq_update_time = time; > > - > > if (sg_policy->next_freq == next_freq) { > > trace_cpu_frequency(policy->cur, cpu); > > You should at least rate limit the trace_cpu_frequency() thing here if > you don't want to advance the last update time I think, or you may > easily end up with the trace buffer flooded by irrelevant stuff. Going back to the reason this tracepoint exists, is it known why powertop thinks the CPU is idle when this tracepoint is removed? Maybe it's possible to get rid of this tracepoint altogether. Thanks for reviewing the series. thanks, Steve