Received: by 10.192.165.148 with SMTP id m20csp347205imm; Fri, 20 Apr 2018 07:44:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx48uTkiySvuZNIpD3QzXxf2iEWAu4f4bmOz7VYSyESJMHW0A59QQZ81VtTqnBXqNGt4oT/B9 X-Received: by 2002:a17:902:96a:: with SMTP id 97-v6mr10731134plm.266.1524235492079; Fri, 20 Apr 2018 07:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524235492; cv=none; d=google.com; s=arc-20160816; b=CUfZAhXSJB4KXKJeNN/MujGOSzNNsy4StHMPYTk6JULikBr0l0pV5qTTZ4vFb69qH0 8AXFzVGn9GvHQ/LPV4rQ9N3xQia8qyvXSh0rUHgbLbjniuQQm8CWypd46rtLyDUIbLON EYOJ/T7zmlhKawt84RkJ3+EXSKseoB6uZu4FD9ftcQ5c0UB+6a/Tv5MDeFTJCTwYPP9N tr2d9Jafi+x1pnbxBfq4gyUhKvmVMK2VC+oBc0a0hhgO56S5W5+Mk0gs5TBszSh0dYy0 sZMOR5c4g04PjBn7pD7n+yioaACO8mc6w63DFz5auhGK/34oqlTX6h3r4li46i7Px0e/ mhJw== 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=URImvV3BBkVfxMqeh12T7r0/MgRgFLTivJijX4/Wa7g=; b=AZ4lz5qUdVSbKVpOwbgmEpPs8YCFdmjD2tUz6Yomq4H6PAQtHjdHgZVP2S13I8IMnM fJ4+bLoEsDqvCShVIzIbpDNVSc1X4FkI4ZIpGczHE0mK5Z8PTLMRDigKWv/bXxDNR05j B49lsenDv8DOPwltdF2YfHqFoMG7xz+hGHq+Zx+hDTUJzN6GZnT7U+wRpC161TzvJ126 ocx6L5FUoxe4OiyXoTM1ztz4ODtuOrSWNH+aT3/6zT+Xal1clj1ZfscN8xrUmahH4UJ5 ZOrOy+K0q7F9OOIKwzGHNqkIqxbR5h5jFnhwWKgUAA1Qk/iTjjsVOQfkZkHDgv/dKpMQ KhgA== 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 q10si5371391pff.124.2018.04.20.07.44.38; Fri, 20 Apr 2018 07:44:52 -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 S1755455AbeDTOmw (ORCPT + 99 others); Fri, 20 Apr 2018 10:42:52 -0400 Received: from foss.arm.com ([217.140.101.70]:49946 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755209AbeDTOmu (ORCPT ); Fri, 20 Apr 2018 10:42:50 -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 579ED80D; Fri, 20 Apr 2018 07:42:50 -0700 (PDT) Received: from e108498-lin.cambridge.arm.com (e108498-lin.cambridge.arm.com [10.1.210.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 434213F59D; Fri, 20 Apr 2018 07:42:47 -0700 (PDT) Date: Fri, 20 Apr 2018 15:42:45 +0100 From: Quentin Perret To: Leo Yan Cc: Dietmar Eggemann , linux-kernel@vger.kernel.org, Peter Zijlstra , Thara Gopinath , linux-pm@vger.kernel.org, Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , "Rafael J . Wysocki" , Greg Kroah-Hartman , Vincent Guittot , Viresh Kumar , Todd Kjos , Joel Fernandes , Juri Lelli , Steve Muckle , Eduardo Valentin Subject: Re: [RFC PATCH v2 4/6] sched/fair: Introduce an energy estimation helper function Message-ID: <20180420144245.GB14391@e108498-lin.cambridge.arm.com> References: <20180406153607.17815-1-dietmar.eggemann@arm.com> <20180406153607.17815-5-dietmar.eggemann@arm.com> <20180418121547.GC15682@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418121547.GC15682@leoy-ThinkPad-X240s> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leo, On Wednesday 18 Apr 2018 at 20:15:47 (+0800), Leo Yan wrote: > Sorry I introduce mess at here to spread my questions in several > replying, later will try to ask questions in one replying. Below are > more questions which it's good to bring up: > > The code for energy computation is quite neat and simple, but I think > the energy computation mixes two concepts for CPU util: one concept is > the estimated CPU util which is used to select CPU OPP in schedutil, > another concept is the raw CPU util according to CPU real running time; > for example, cpu_util_next() predicts CPU util but this value might be > much higher than cpu_util(), especially after enabled UTIL_EST feature > (I have shallow understanding for UTIL_EST so correct me as needed); I'm not not sure to understand what you mean by higher than cpu_util() here ... In which case would that happen ? cpu_util_next() is basically used to figure out what will be the cpu_util() of CPU A after task p has been enqueued on CPU B (no matter what A and B are). > but this patch simply computes CPU capacity and energy with the single > one CPU utilization value (and it will be an inflated value afte enable > UTIL_EST). Is this purposed for simple implementation? > > IMHO, cpu_util_next() can be used to predict CPU capacity, on the other > hand, should we use the CPU util without UTIL_EST capping for 'sum_util', > this can be more reasonable to reflect the CPU utilization? Why would a decayed utilisation be a better estimate of the time that a task is going to spend on a CPU ? > > Furthermore, if we consider RT thread is running on CPU and connect with > 'schedutil' governor, the CPU will run at maximum frequency, but we > cannot say the CPU has 100% utilization. The RT thread case is not > handled in this patch. Right, we don't account for RT tasks in the OPP prediction for now. Vincent's patches to have a util_avg for RT runqueues could help us do that I suppose ... Thanks ! Quentin