Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1757925ybg; Sat, 19 Oct 2019 01:53:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwM8YIzgz1GuZZdoTEHPwd1qzaX4OP+QpZssXWFVmkeMBySoldnAYylkhk+lGRXh3PHon/U X-Received: by 2002:a17:906:e82:: with SMTP id p2mr12360396ejf.237.1571475236143; Sat, 19 Oct 2019 01:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571475236; cv=none; d=google.com; s=arc-20160816; b=HrFTvOf6w/NF2UAPIB3AUdavUrIHVhl4mJxnouM9jwXIa5JyM7F+VZbyUM3D+SYlS3 BVvpQ/XWe7P0yIDuNSgP6YYZp7vJFFxfrU+qWColHbg3IKctbPtz251DSkcme4qPf/L8 y2vB5YU6G/P0mhvA2S2owxsvtTcGdMMGnPIghEp9mXGlASplCXDu+6uifsd/FYbyf1Z6 nd8DLMHQolJfY+eI1nuSo9XgMPGy35uevSB0eqllDjzgSaHDInJykC80BxJh1czGaeIy qgoxwZGep4+u8tU4xkwlapF9GFq1dju0adxzkYuQn5ykTrRI8eCvDXBP9QCA08VG/iIR mW0Q== 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:organization:from:references:cc:to:subject; bh=sVhtLtr7BfFkvOZ93Onb8MkNU4mcYwHDi/wKGBF3jRE=; b=YS5h9bQEpDzzQzSB2Qc3BJom5PgbE30I8jy7nbN50uHdpxcSnJkifWOaUQLeBfxxIb FGsO9MqdIbEAbViI+wk0cdFIlDmANNS4+7B9SjTVZuidzy/PMnm8DTxqpUZeI6cnrjEg NokypGVgVVU2JoUgh1Mr3Su627a+/WER/DvGjm6yq1iJma4e7bGf9D81FuuyK3xb1/DE Q0+fjWAlcPxm1kxP5xob40jbQ3GOTEUFU/6LWsCpx2YdoYXpkzfxbH5JpKRqakWsZu9/ vvD9EeDfmH+cCAtSXaDkKif89lHg1eNOfTWzqDikBqmU/KnJwIapmfOMCLcuALy6uY4i Vs/Q== 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 k6si6021853edb.235.2019.10.19.01.53.32; Sat, 19 Oct 2019 01:53:56 -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 S2405890AbfJRRZX (ORCPT + 99 others); Fri, 18 Oct 2019 13:25:23 -0400 Received: from [217.140.110.172] ([217.140.110.172]:46834 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1729210AbfJRRZX (ORCPT ); Fri, 18 Oct 2019 13:25:23 -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 724031063; Fri, 18 Oct 2019 10:25:00 -0700 (PDT) Received: from [10.1.195.43] (e107049-lin.cambridge.arm.com [10.1.195.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CF2CA3F718; Fri, 18 Oct 2019 10:24:58 -0700 (PDT) Subject: Re: [RFC PATCH v3 0/6] sched/cpufreq: Make schedutil energy aware To: Peter Zijlstra , Dietmar Eggemann Cc: Quentin Perret , 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, Quentin Perret , 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> <2cbde0fe-c10c-0ebb-32ef-2d522986bc89@arm.com> <20191018075957.GD2328@hirez.programming.kicks-ass.net> From: Douglas Raillard Organization: ARM Message-ID: <65894424-3fdc-2b82-c84d-dac61aded5ea@arm.com> Date: Fri, 18 Oct 2019 18:24:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20191018075957.GD2328@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB-large Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/19 8:59 AM, Peter Zijlstra wrote: > On Fri, Oct 18, 2019 at 09:44:44AM +0200, Dietmar Eggemann wrote: >> 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] > > Well, chalk that up to confusion inspired by the Changelog of patch 1. I've updated the commit message to include that ordering OPPs by increasing efficiency=capa/power on one CPU leads to the same ordering as ordering by decreasing cost=power*f_max/f. efficiency=(cpu_max_capa/1024) * (f/f_max) / power efficiency=(cpu_max_capa/1024) / cost > Let me redo it with that formula then. >