Received: by 10.192.165.156 with SMTP id m28csp492521imm; Wed, 11 Apr 2018 02:32:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx48gKc1O1fEqp9zBy4sBYtC5Da2mscegOM07ys/NmfSaWU9pCpPxcpgmJ1o3cL7CbhcrfUA/ X-Received: by 10.99.100.132 with SMTP id y126mr2810461pgb.77.1523439177543; Wed, 11 Apr 2018 02:32:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523439177; cv=none; d=google.com; s=arc-20160816; b=H0OBxYO0SVjxF8chydJUfYF3APzXGRQCDHTEihze1A6CXVObSMDbCVr46AqJd2aEex 9X/wqK9l2bjtotZWFPyYRQaLUTw3p2PjeRDY7FlyHqOynDqap/Hy9hcuDIhyHLIjGQar 9ZTpFTf48T3Ma6C8AGMkFwKwwTNIzBaZ4VkasA2v9HQL7kHGncvDtDGjQgtOI/D2knqb 72I9iOw8ZGCyYDjPuki1MAKT/bHIu3/RoLointHCkl+4fmqQhokAAULoSXmmo8Y7qoGj ncIs/HfOjUPzSj9dVIqqL7kkMx0KtxXVEPygPY12XA9bWPFKEkH3ND8tOO9KBcCvYdFE 2mVw== 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:arc-authentication-results; bh=TSEgzSldpF3R4GgtdBSOKouFdcjZXoCWTOvxMjGdJJo=; b=GC2Q3WlvXfIOXvPKWxMehKZvkwwQFnIwZ6FZKKEVqraFtrDWu1EBHG3qBVZerL4Mat etMYAs3FmWu9yLuFVxRyxPi4lGpZtcSgvcz8WLgrE78q6VgkHk6HBpw2x1decNuFHfIl TSYE3/cYWIWk3Ym5wj4XZEs8G00JMsvt/u7JW/0tfqb1dDG+giX8H3Ex/7OB7y/KSFyb M9dQEacs3tssItrzAbxGhL2MTAL/Ffbp1U6KIQRFyS7DScpIk6COToogvJ6kzNOwGCNj tFWJYUtuiVTK676AP0gvn6tNWyCy4+3LZAbROHi/N/GG2TaWseOUeTJ0MpMqwdFkKqR4 iCjQ== ARC-Authentication-Results: i=1; mx.google.com; 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 s9si472628pgc.202.2018.04.11.02.32.20; Wed, 11 Apr 2018 02:32:57 -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; 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 S1752446AbeDKJ2E (ORCPT + 99 others); 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 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C7DA680D; Wed, 11 Apr 2018 02:28:01 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.210.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8E2283F24A; Wed, 11 Apr 2018 02:27:59 -0700 (PDT) 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 Precedence: bulk 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