Received: by 10.192.165.156 with SMTP id m28csp304610imm; Tue, 17 Apr 2018 10:23:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/TTn2QJgxS6vpUZLN41PAh9fxi7hoKpoFtrWb1GaRbBRUWAtKG02d14YuCefEQteGXYQvG X-Received: by 10.167.128.207 with SMTP id a15mr2744703pfn.116.1523985822015; Tue, 17 Apr 2018 10:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523985821; cv=none; d=google.com; s=arc-20160816; b=EAV7NvJpK2e5ravDHhZKJ9Q8jKIxhKEx81hIXVm7Mr4OQ8ZD6maOHJ+ZDBSjq+I3Qn EO0XJTrE3kgnEE9LXj0dGQL0qVsf5qvM37xFNM1Wq8FCeUGir2ZO8JAmq92NnhyVi5E4 hryjHLhHFSG9xa/kPtolf5O5K8nAI3sV1QJQIyfdb8QvPBZUEJJT/cqHNQFOJ0httvwA dWh0Tise1aVEhuFLhCzygiQQKxrD8GQ3AxZVk32GsKPaTvX//lL3EVYhUoOhBSh2Z5BP Ac+N/Kb/l/dcOFwa7uVLSHO5MbaP7gR1P3oDpziwaflOeuHfU9kvWWPOFysvKtIy+Tqy srcg== 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:arc-authentication-results; bh=8y0Pm77FDdmXXV4MuUQ61+VNAim5HXRFUhmhNik26ks=; b=WQduyvjZ+qFgmSp9N773AKWCLi8TkTgZ9mBDyKoqGBjvRx0S72Wdf0XxMcNtW5Pazz maLn9pZ1LEKLuVyF853WyNj635GNPqkk64V8BMnuZwrDI2err5MX6XJq/BIA3DMYLL7e 3USQmwFjmZsMBQgS114X/3XXf8c6Di6b3mjvZrm8eFRV9UobJmCpuQjmOcwaALdUKSVg uJg48rBQo0aXmEof4vFyhl65+8sU7zKp/TTBugExJieUmM/DEh3DXbr+1bvWWYvtHAZa c8W52UpKD95Mv5PGTFSW3BU1J9JyjWRxzpzJSUBA/fgMa9Q/RmjrqXqMdRxgBs8N8LPp 8kOw== 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 t16si13453847pfj.10.2018.04.17.10.23.27; Tue, 17 Apr 2018 10:23:41 -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 S1752760AbeDQRWL (ORCPT + 99 others); Tue, 17 Apr 2018 13:22:11 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:46006 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbeDQRWJ (ORCPT ); Tue, 17 Apr 2018 13:22:09 -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 4858F1435; Tue, 17 Apr 2018 10:22:09 -0700 (PDT) Received: from [192.168.11.82] (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 61EC63F587; Tue, 17 Apr 2018 10:22:05 -0700 (PDT) Subject: Re: [RFC PATCH v2 0/6] Energy Aware Scheduling To: Leo Yan Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Quentin Perret , 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 References: <20180406153607.17815-1-dietmar.eggemann@arm.com> <20180417125059.GA18509@leoy-ThinkPad-X240s> From: Dietmar Eggemann Message-ID: <20ed355c-21f7-79c2-e3b3-05d8cfb0c176@arm.com> Date: Tue, 17 Apr 2018 19:22:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180417125059.GA18509@leoy-ThinkPad-X240s> Content-Type: text/plain; charset=utf-8; format=flowed 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 Hi Leo, On 04/17/2018 02:50 PM, Leo Yan wrote: > Hi Dietmar, > > On Fri, Apr 06, 2018 at 04:36:01PM +0100, Dietmar Eggemann wrote: [...] >> 1.1 Energy Model >> >> A CPU with asymmetric core capacities features cores with significantly >> different energy and performance characteristics. As the configurations >> can vary greatly from one SoC to another, designing an energy-efficient >> scheduling heuristic that performs well on a broad spectrum of platforms >> appears to be particularly hard. >> This proposal attempts to solve this issue by providing the scheduler >> with an energy model of the platform which enables energy impact >> estimation of scheduling decisions in a generic way. The energy model is >> kept very simple as it represents only the active power of CPUs at all >> available P-states and relies on existing data in the kernel (only used >> by the thermal subsystem so far). >> This proposal does not include the power consumption of C-states and >> cluster-level resources which were originally introduced in [1] since >> firstly, their impact on task placement decisions appears to be >> neglectable on modern asymmetric platforms and secondly, they require >> additional infrastructure and data (e.g new DT entries). > > Seems to me, if we move forward a bit for the energy model, we can use > more simple method by generate power consumption: > > Power(@Freq) = Power(cpu_util=100%@Freq) - Power(cpu_util=%0@Freq) > > From upper formula, the power data includes CPU and cluster level > power (and includes dynamic power and static leakage) but this is > quite straightforward for measurement. > > I read a bit for Quentin's slides for simplized power modeling > experiments [1], IIUC the simplized power modeling still bases on the > distinguished CPU and cluster c-state and p-state power data, and just > select CPU p-state power data for scheduler. I wander if we can > simplize the power measurement, so the power data can be generated in > single one testing and the power data without any post processing. > > This might need more detailed experiment to support this idea, just > want to know how about you guys think for this? > > This is a side topic for this patch series, so whatever the conclusion > for it, I think this will not impact anything of this patch series > implementation and upstreaming. > > [1] http://connect.linaro.org/resource/hkg18/hkg18-501/ The simplified Energy Model in this patch-set only contains the per-cpu p-state power data. This allows us to only rely on the knowledge of which OPP's (opp frequency/max frequency) we have for the individual frequency domains and the CPU dt property 'dynamic-power-coefficient'. This is even encapsulated in the new PM_OPP library function dev_pm_opp_get_power(). Please note that this has to be redesigned since neither Rafael nor Peter like the idea of using PM_OPP library here. But we will continue to only use per-cpu p-state power data. [...] >> 30 iterations of perf bench sched messaging --pipe --thread --group G >> --loop L with G=[1 2 4 8] and L=50000 (Hikey960)/16000 (Juno r0). > > What's the reason to select different loop number for Hikey960 and > Juno? Based on the testing time? The Juno r0 board has only ~0.3 of the performance of the Hikey960. We wanted to have roughly comparable test execution time numbers. We're only interested in the difference between running w/ and w/o this code per platform.