Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1386676ybg; Fri, 18 Oct 2019 17:14:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5qPqMkIy7igpZFa0iUOBRJZBGcspGc9HZ2RfUT8mafoN6kuzx9fYtqLSntWawAj2e2QAP X-Received: by 2002:a17:906:7c57:: with SMTP id g23mr11431024ejp.116.1571444053793; Fri, 18 Oct 2019 17:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571444053; cv=none; d=google.com; s=arc-20160816; b=McYOiozhf3TVYirmTanYnsGoludt3n46NQEReRHvZA+u4OjooJ+Vxdio6uPaKYvE0N 9Xn/Blh+1fLvcwOI/6Beu8K5L3kGWY22d2mpxXXPiGq3oWh7P5ztNN/MgTk9y8T29I6k r7HnNNgcOLoW97wnz5Nkkw/A9qyLSTi4gSaQ9lAa3BODivg33ICFSexfnoBYHa0VKq9b xzcjJj5JX1JuZYwqjWMsA0hnHkG5MWhvoPHJbB6DhaxpAc5KP1gut1g7njZ8Nd9wnJhP g66sskhskdSlvA7QaJTEdA4y1ENGKI/t6MPcUMxivN/YVQYkKgNoyiHK4TfR8MMOboYf AbdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=KlS5oKTLwQ9nuHEwg7tE3BgiCSbuJGeU7YCN8cfd0DE=; b=tArtzGfsEYnyuCeMGM/LKhKDzJBjmcPzU+yoGsxd10W4TzhkyXLQJ29ya/P01Iq2YG ZaHbjz5buSOsnQ6P81cHSGMkL5SvSkeG9co0uPTBIW7+Wbc1xInn2HOng3+jNXQSr333 wHVGISzFiUA/pqHY5g1G1G0q82ks+36LBY1XfgPolvtxbmBr2LwfznD/EWFKjCdn7/C5 ulFjE59pRZ2uq8rBGsSfKevAkY/LE9iO+g1HOW1TmA6eQJLheRGQuZCfIxiTMujLatgQ 7LLMaemIdK3JL1+U8Tv1qcIHX6OvKJiUoj4Hy5pBoe20NpxjrBl4K84Ei67bWf7hcbQ5 eGIA== 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 b3si5239927ede.118.2019.10.18.17.13.50; Fri, 18 Oct 2019 17:14: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 S2504491AbfJRHpK (ORCPT + 99 others); Fri, 18 Oct 2019 03:45:10 -0400 Received: from [217.140.110.172] ([217.140.110.172]:57362 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S2404288AbfJRHpK (ORCPT ); Fri, 18 Oct 2019 03:45:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8DA8F332; Fri, 18 Oct 2019 00:44:47 -0700 (PDT) Received: from [192.168.0.9] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8ED2B3F718; Fri, 18 Oct 2019 00:44:45 -0700 (PDT) Subject: Re: [RFC PATCH v3 0/6] sched/cpufreq: Make schedutil energy aware To: Peter Zijlstra , Quentin Perret Cc: Douglas Raillard , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mingo@redhat.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, qperret@qperret.net, patrick.bellasi@matbug.net, dh.han@samsung.com References: <20191011134500.235736-1-douglas.raillard@arm.com> <20191014145315.GZ2311@hirez.programming.kicks-ass.net> <20191017095015.GI2311@hirez.programming.kicks-ass.net> <20191017111116.GA27006@google.com> <20191017141107.GJ2311@hirez.programming.kicks-ass.net> From: Dietmar Eggemann Message-ID: <2cbde0fe-c10c-0ebb-32ef-2d522986bc89@arm.com> Date: Fri, 18 Oct 2019 09:44:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191017141107.GJ2311@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/10/2019 16:11, Peter Zijlstra wrote: > On Thu, Oct 17, 2019 at 12:11:16PM +0100, Quentin Perret wrote: [...] > It only boosts when 'rq->cfs.avg.util' increases while > 'rq->cfs.avg.util_est.enqueued' remains unchanged (and util > util_est > obv). > > This condition can be true for select_task_rq_fair(), because that is > ran before we do enqueue_task_fair() (for obvious raisins). > >>> I'm still thinking about the exact means you're using to raise C; that >>> is, the 'util - util_est' as cost_margin. It hurts my brain still. >> >> +1 ... > > cost_i = capacity_i / power_i ; for the i-th OPP I get confused by this definition. efficiency=capacity/power but the cs->cost value used in em_pd_get_higher_freq() is defined as cs_cost = cs->power * cpu_max_freq / cs->freq [energy_model.h] > We then do: 'x = util - util_avg' and use that on the first > OPP >= min_freq: > > cost(x) = cost_j + cost_j * x ; freq_j >= min_freq > = cost_j * (1 + x) > > And then we find the highest OPP that has: > > cost_k <= cost(x) [...]