Received: by 10.192.165.148 with SMTP id m20csp1302016imm; Thu, 10 May 2018 08:37:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqshYWzypi2eRLs1BZN6MyVfekLckMke1xkb1rSQDM9NbVDavZpefc6xJ+pHy81YqYbdcXh X-Received: by 2002:a65:6027:: with SMTP id p7-v6mr1565428pgu.210.1525966633564; Thu, 10 May 2018 08:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525966633; cv=none; d=google.com; s=arc-20160816; b=WJvnqK+Nc29FH8AFSmxsoFIQGKSYuDOZE1EjKy135AwYvuPzGsHsxrbdBbD6xobWae xTH+fNJljrsHOzJjir/xvuXkSbK3hpToc0EEWyUfSQb7E+OoJCR4Gh56Jr+2uPMipcB5 XmXqncAzpjI9gm/Itz/AoVsoqQR2DHEk+lqZvoW5LJ0lbNG8ncdSWeo0L4RGttICmaXZ sCs/JDSCqk/2hEMI7TH6WCpnV+/cly4ciW2Vwc2QMEW0eQLEkSYsvuotWIyYHewCeX1f pcSWQE8dgtge/wz6iTi/dqNgcQFazOyZyjTgFVDTd1f4mT43+4zJAMiUjOUJPLpY8s5W 9KsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=wdTIuFZZLcPR/Qhaar87g6M11FxdXJUa3eMoaasG38M=; b=QSf+Ru3/jwQFIz1hO2LlMyXb0KNcDzgsVNP6KPjKAyxetCl46RGjdhQf3Hsa6v5Tu8 3hgC6by5sJtbzF0fLEdfvB9UbDJ3nLpsZ47M2VvTUdAuwRUT7duVI2z2R2ki6oBFfJFi ynOi3MKem4QZtsKDgjnPYLDCWh0MqEaAFirjT3G4/fwUaBCIb7FzuXwJiF/P4tM9b/La 3hEuwJUY9JMaYr8GgvN8Gmd0K/RT/OoAuMVeq6B71ccEP0kWArg1Zv5JWekyHJO9vG9F eDIDb4avK/8mKmVS1UxW0cSHdxVp6aHBNT4WPVhdCZhIC5CiIS9Zqr6ho2Sn/jGFx9+5 5DDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=urwhuLH5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2-v6si842574pgc.438.2018.05.10.08.36.54; Thu, 10 May 2018 08:37:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=urwhuLH5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966277AbeEJPe3 (ORCPT + 99 others); Thu, 10 May 2018 11:34:29 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41674 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966093AbeEJPe1 (ORCPT ); Thu, 10 May 2018 11:34:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wdTIuFZZLcPR/Qhaar87g6M11FxdXJUa3eMoaasG38M=; b=urwhuLH5L16d+SL3ewqqMBpVB Up2nbjuh8/Ie2gBIYLougAsW/MSKCe/Sn78y3rrEhcfYKFq/qjHzngDNV40u7+5lq7gAqLfkAz2nA 4pO2yumecfb+il2dm1NALrfjHgh3hLOyREs5LdqJJbHri1MZw6ZG6c27ZCiFSdMTBkaAobK0bjV/5 ILXj4VH+b2YLv/FYuKoWz+qf+LnW8vLetvm/pEBy0qTrBQJUPh5IN/eiviQEXgtfBejoo66pRRE1t F2vmJyAZ/EHUtQ3ljlxLKMBO5PCnxOfMPdv5vdIqgmdkeHDKQm+CDr+tqD8vGf1db9q8gxv0ktgX3 EtcaCC2rw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGnaI-0005C1-Oh; Thu, 10 May 2018 15:34:22 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 901042029FA13; Thu, 10 May 2018 17:34:20 +0200 (CEST) Date: Thu, 10 May 2018 17:34:20 +0200 From: Peter Zijlstra To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Joel Fernandes , Steve Muckle Subject: Re: [PATCH 2/3] sched/fair: util_est: update before schedutil Message-ID: <20180510153420.GG12217@hirez.programming.kicks-ass.net> References: <20180510150553.28122-1-patrick.bellasi@arm.com> <20180510150553.28122-3-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180510150553.28122-3-patrick.bellasi@arm.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 10, 2018 at 04:05:52PM +0100, Patrick Bellasi wrote: > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 1f6a23a5b451..01dfc47541e6 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -5356,6 +5356,9 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) > struct cfs_rq *cfs_rq; > struct sched_entity *se = &p->se; > > + /* Estimated utilization must be updated before schedutil */ > + util_est_enqueue(&rq->cfs, p); Please clarify the comment with a reason; because I'm sure that the next time I see that comment, I'll go 'but why again!?'. > /* > * If in_iowait is set, the code below may not trigger any cpufreq > * utilization updates, so do it here explicitly with the IOWAIT flag