Received: by 10.213.65.68 with SMTP id h4csp1387830imn; Wed, 21 Mar 2018 09:27:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELsyYAcKRT43ZKZ3+xZZl44FmRcVIgup5J00JdfQeQ5mhj96Xbp4DVD6z/S1gvi85Po9ZxCR X-Received: by 10.101.90.68 with SMTP id z4mr184454pgs.184.1521649633460; Wed, 21 Mar 2018 09:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521649633; cv=none; d=google.com; s=arc-20160816; b=MRj4YjOVlwYpTotnNqobMmlOwVzZ3jN8l5/KI8EnNGR6WTNhW5ifngT/Z7wRg7Zem7 3PMqYC2/xxX7mULNUwHEVCtgENBUBlK4CbBMuJYXxwEyYekFpEPgJ95mpCUK6BolyAKs TltzlhgcLVz/zJWyRdHvSU9h9WZWN60qAHnTRT+nanXjYQunkPNV3jZxO5Mdx5j+T0dV jFbB8RyQsB1AT9ozIUqpVZXSPI2Dxg8MBMtb2EDgwDD/wHiAikKUANSK7XZwNgGggOQ3 dot+o1Nypc3E9lD9X0SrKTTauFkiehb4Mm6zn7EzPfy5S0yyMmO+fEQw9HVlYEX38FF1 8tBA== 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=lQrWL1H2LCQ6wQaufThcYFSp+SMfThjwufMWRCTgIx8=; b=sz8VR+wvMLG9TNhY1fKKKt8KcqJbsIBALzeI/S974WVPw5TdBpegQBj2WwwXzl0u6Y Rlw05SqqUXpRsVHlK13rVGmmNWgs72rIgRdV14LolkeJE9xGdV9Y/J5cy2LKaYt9b7jE ZfZHHa9zNdFjdWueKAvX7BHhAZvK1ssoqDh1pEhTrF0820ThA7KV14TENMUwLmYgUh2F A8vkvxTgzyY7abEGXsTwXQUr3ZNnQaKRwxG2ECgDozkjKuXbUD00/oYFmyiQGdh+nINJ 4pI9TxL5YsF7esosiaC+ZIzlxItPqAmEfrpsII/bFIeh4/KOa+znA9eIEzgdzSJTR5aL UC9w== 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 o33-v6si4214633plb.369.2018.03.21.09.26.58; Wed, 21 Mar 2018 09:27: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; 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 S1752518AbeCUQ0N (ORCPT + 99 others); Wed, 21 Mar 2018 12:26:13 -0400 Received: from foss.arm.com ([217.140.101.70]:55874 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751423AbeCUQ0L (ORCPT ); Wed, 21 Mar 2018 12:26:11 -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 E1C5680D; Wed, 21 Mar 2018 09:26:10 -0700 (PDT) Received: from e105550-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 441FF3F24A; Wed, 21 Mar 2018 09:26:08 -0700 (PDT) Date: Wed, 21 Mar 2018 16:26:05 +0000 From: Morten Rasmussen To: Juri Lelli Cc: Quentin Perret , Patrick Bellasi , Dietmar Eggemann , linux-kernel@vger.kernel.org, Peter Zijlstra , Thara Gopinath , linux-pm@vger.kernel.org, Chris Redpath , Valentin Schneider , "Rafael J . Wysocki" , Greg Kroah-Hartman , Vincent Guittot , Viresh Kumar , Todd Kjos , Joel Fernandes Subject: Re: [RFC PATCH 4/6] sched/fair: Introduce an energy estimation helper function Message-ID: <20180321162605.GO4589@e105550-lin.cambridge.arm.com> References: <20180320094312.24081-1-dietmar.eggemann@arm.com> <20180320094312.24081-5-dietmar.eggemann@arm.com> <20180321090430.GA6913@localhost.localdomain> <20180321122621.GA13951@e110439-lin> <20180321125925.GB15165@localhost.localdomain> <20180321135557.GB1373@queper01-VirtualBox> <20180321151513.GE15165@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180321151513.GE15165@localhost.localdomain> 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 Wed, Mar 21, 2018 at 04:15:13PM +0100, Juri Lelli wrote: > On 21/03/18 13:55, Quentin Perret wrote: > > On Wednesday 21 Mar 2018 at 13:59:25 (+0100), Juri Lelli wrote: > > > On 21/03/18 12:26, Patrick Bellasi wrote: > > > > On 21-Mar 10:04, Juri Lelli wrote: > > [...] > > > > > > > + /* > > > > > > + * As the goal is to estimate the OPP reached for a specific util > > > > > > + * value, mimic the behaviour of schedutil with a 1.25 coefficient > > > > > > + */ > > > > > > + util += util >> 2; > > > > > > > > > > What about other governors (ondemand for example). Is this supposed to > > > > > work only when schedutil is in use (if so we should probably make it > > > > > conditional on that)? > > > > > > > > Yes, I would say that EAS mostly makes sense when you have a "minimum" > > > > control on OPPs... otherwise all the energy estimations are really > > > > fuzzy. > > > > > > Make sense to me. Shouldn't we then make all this conditional on using > > > schedutil? > > > > So, in theory, EAS could make sense even for other governors than > > schedutil. Even with the performance governor it is probably more > > energy efficient (although users using "performance" probably don't care > > about energy, but that's just an example) to place small tasks onto little > > CPUs up to a certain point given by the energy model. The ideal solution > > would be to change the behaviour of find_cap_state() depending on the > > governor being used, but I don't know if this extra complexity is worth > > it really. > > I'm happy to make all this conditional on schedutil as a first step and > > we can see later if that makes sense to extend EAS to other use-cases. > > I agree that EAS makes still sense even for !schedutil cases (your > performance example being one of them, powersave maybe another one?). > Making it work with ondemand is tricky, though. > > So, not sure what's the best thing to do, but we should be at least aware > of limitations. I would suggest making as few assumptions about the OPP selection as possible. Even when we do use schedutil, there could be number of reasons why we don't actually get the OPP schedutil requests (thermal, hardware-says-no,...). In the previous energy model-driven scheduling postings, years back, I went with the assumption that OPP would follow the utilization. So if we put more tasks on a cpu, the OPP would increase to match. If cpufreq or hardware decided to go faster, that is fine but it could lead to suboptimal decisions. We could call into schedutil somehow to make sure that we at least request the same OPP as the energy model assumes if the overhead is small and we can present schedutil with all the information it needs to choose the OPP for the proposed task placement. I wonder if it is worth it, or if we should just decide on a simple assumption on OPP selection for energy estimation and stick it in a comment. Morten