From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbeDKJ2E (ORCPT ); Wed, 11 Apr 2018 05:28:04 -0400 Received: from foss.arm.com ([217.140.101.70]:47056 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbeDKJ2C (ORCPT ); Wed, 11 Apr 2018 05:28:02 -0400 Date: Wed, 11 Apr 2018 10:27:56 +0100 From: Patrick Bellasi To: Vincent Guittot Cc: linux-kernel , "open list:THERMAL" , Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Juri Lelli , Joel Fernandes , Steve Muckle , Dietmar Eggemann , Morten Rasmussen Subject: Re: [PATCH] sched/fair: schedutil: update only with all info available Message-ID: <20180411092756.GK14248@e110439-lin> References: <20180406172835.20078-1-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 11-Apr 09:57, Vincent Guittot wrote: > On 6 April 2018 at 19:28, Patrick Bellasi wrote: > > > } > > @@ -5454,8 +5441,11 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) > > update_cfs_group(se); > > } > > > > - if (!se) > > + /* The task is no more visible from the root cfs_rq */ > > + if (!se) { > > sub_nr_running(rq, 1); > > + cpufreq_update_util(rq, 0); > > call to cpufreq_update_util() should be done after util_est_dequeue() Yeah... good point, looks like I should have notice it :) That's another compelling example why updating schedutil as a side effect of update_load_avg does not allow to easily track when it's the best time to trigger an update. UtilEst is now a factor which could impact on OPP selection for CFS tasks, and thus we should update at the really end of the function. > > + } > > > > util_est_dequeue(&rq->cfs, p, task_sleep); > > hrtick_update(rq); -- #include Patrick Bellasi