From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753245AbdK3NWl (ORCPT ); Thu, 30 Nov 2017 08:22:41 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:46068 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752990AbdK3NWj (ORCPT ); Thu, 30 Nov 2017 08:22:39 -0500 X-Google-Smtp-Source: AGs4zMbQDVpwBrPfjuAZ704LdGec/nEmKhaBDZ2Ql/rECJimcXT3KOEGywBgfVVr8UpGgCKqa6yfBw== Date: Thu, 30 Nov 2017 14:22:34 +0100 From: Juri Lelli To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Todd Kjos , Joel Fernandes Subject: Re: [PATCH v3 3/6] cpufreq: schedutil: update CFS util only if used Message-ID: <20171130132234.GC9903@localhost.localdomain> References: <20171130114723.29210-1-patrick.bellasi@arm.com> <20171130114723.29210-4-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171130114723.29210-4-patrick.bellasi@arm.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 30/11/17 11:47, Patrick Bellasi wrote: > Currently the utilization of the FAIR class is collected before locking > the policy. Although that should not be a big issue for most cases, we > also don't really know how much latency there can be between the > utilization reading and its usage. > > Let's get the FAIR utilization right before its usage to be better in > sync with the current status of a CPU. > > Signed-off-by: Patrick Bellasi > Reviewed-by: Dietmar Eggemann > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Rafael J. Wysocki > Cc: Viresh Kumar > Cc: linux-kernel@vger.kernel.org > Cc: linux-pm@vger.kernel.org > > --- > Changes from v2: > - rebased on v4.15-rc1 > > Change-Id: I9291a560bcad7db76894e3f0fcdb917511d0479e > --- > 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 448f49de5335..40521d59630b 100644 > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -351,10 +351,9 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, > unsigned int next_f; > bool rt_mode; > > - sugov_get_util(&util, &max, sg_cpu->cpu); > - > raw_spin_lock(&sg_policy->update_lock); > > + sugov_get_util(&util, &max, sg_cpu->cpu); > sg_cpu->util = util; > sg_cpu->max = max; Patch looks good. Reviewed-by: Juri Lelli However, not sure $SUBJECT is really in sync with what the patch does? CFS gets "used" before and after the patch... last paragraph of the changelog looks more like it. :) Best, Juri