Received: by 10.192.165.156 with SMTP id m28csp15699imm; Tue, 17 Apr 2018 05:53:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx49xJPOQLHEJK3NHxSC6s4YWICJ33oMofFj35Lxl/uOBNJWg+3NzTIc/tJI32LXjeeqxKChd X-Received: by 2002:a17:902:68c5:: with SMTP id x5-v6mr1994373plm.194.1523969618321; Tue, 17 Apr 2018 05:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523969618; cv=none; d=google.com; s=arc-20160816; b=bwSByramMyTa0ZUXfaARzxhVp42aqMYk6TCgc3yo7S5cQbVOsxqDrHpT02a7Dh3Ajh TUbsTOlR5AKRHVGccwsIvJtd6b5+jXAxuaSyw5VpNPB0uDbkzx11m9XKhYZ7SaSNxRyU OSrFfTbN1A/EZ3N4PG77DHsHWbkwHLRbONyuxoMgAzcP5Vklkdp2IASPKjiattPGjyLR 9UERsCoQVUtQhsLzZGXpBFAXk2bPZP0b2yzHDiqAFKRbSZDHbEqzqHhror+ii209EXLe 9PjcPF4fT3v/oA3kqv0PMA+uKrlnpHPdFG4j+afXpiUxFcqXa6w7/WIKBCiMY28vDa1z yifw== 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:dkim-signature:arc-authentication-results; bh=TKlv+jBLEX2bX4iPbS9Y//qP2ivv4FVx+Z7saNMZvi8=; b=SWTF+8gst3IITNarhzqdjT426ImN2oSdxO3w9C3etDcsOOmwIPjNHIrwY/4kyUa5wD Unr9MAlsFJaaGRDwI56Wte0OjzuTPgryz1HMift9Zwyp8JHFIRiEnF1oDnO1uEclHmk0 9iv+1eMBaV8GVUg5Z+DOHlMyhbaQ1RwnaBlhCuIl3Ndy+KAJiA3Y1z2mUsj9IAEvqPSY NnJzWx/tSp1BMqMt/8+wRi2xGoFFw+BMWUeus9R4VXDmzBwTSwa676stHHb3Brs1TsmZ Z1ImjVL6P4sChTpEniPaeg0yqo0SstKry7hzmy+5edmdK8UcQjIKEciKlSAaE0BAGzOh 7bFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bPbpgDkG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si2775903pgu.98.2018.04.17.05.53.23; Tue, 17 Apr 2018 05:53:38 -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; dkim=pass header.i=@linaro.org header.s=google header.b=bPbpgDkG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753270AbeDQMvY (ORCPT + 99 others); Tue, 17 Apr 2018 08:51:24 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:41324 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753227AbeDQMvV (ORCPT ); Tue, 17 Apr 2018 08:51:21 -0400 Received: by mail-oi0-f66.google.com with SMTP id 188-v6so17792831oih.8 for ; Tue, 17 Apr 2018 05:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TKlv+jBLEX2bX4iPbS9Y//qP2ivv4FVx+Z7saNMZvi8=; b=bPbpgDkG/5fM03QNrzTr3kz5vCwDZM4p5BXsQFjEbnENNIhO89Vh4a/RHBLYBq8IA8 FiT319qQQufw3BnspXXikz2YrxP7dS4JWF031OMosLK8mWZdT9j4gRuNJTVhLj7J/J/I Gx1gxDEqa56tUGV5DRUSaxRvhSQTH0sLEdG4Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TKlv+jBLEX2bX4iPbS9Y//qP2ivv4FVx+Z7saNMZvi8=; b=USbYsQfEsFukkF0OgNjVcQlrDp+4SdJiK4pmYlsxd8vfnrjarUhdDvtpCcdjN+FuxF I8MeIkfcFneeaLoDCx80MRVSXdBHUt8bMC/CgaGyJf7IyL1uXwQI5duJmXkrTl3+DWWF 3x2jZ3Y160yUCUaWCH3Vzk68UszPQfSkGUdAlMxgb2rrljUhoBM1rAHypQbX7XcXXKF3 ZdPEHQMycu+reCOOpKw5/lUj/ypwNV96O9Tsgvf+9xhXkh9UB5J4gDg37E3O9/UAyhXd 3tvSqJ1iQXzxldOtmdGpiP/rSQk4JFHnM4opu0o9SClLeA6BTyFpdsWOHAHpsvmD+/sd SsdA== X-Gm-Message-State: ALQs6tAGgPRKGIVTs5upmAkFmR8j2hJ04EhPhI5Z8xZ7bnBHQDX+0kH7 uZd8g2QTxv00euQisAMwZTCisg== X-Received: by 2002:aca:f13:: with SMTP id 19-v6mr1139739oip.298.1523969480480; Tue, 17 Apr 2018 05:51:20 -0700 (PDT) Received: from leoy-ThinkPad-X240s (li973-238.members.linode.com. [45.33.19.238]) by smtp.gmail.com with ESMTPSA id h205-v6sm9922760oic.0.2018.04.17.05.51.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 05:51:19 -0700 (PDT) Date: Tue, 17 Apr 2018 20:50:59 +0800 From: Leo Yan To: Dietmar Eggemann 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 Subject: Re: [RFC PATCH v2 0/6] Energy Aware Scheduling Message-ID: <20180417125059.GA18509@leoy-ThinkPad-X240s> References: <20180406153607.17815-1-dietmar.eggemann@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180406153607.17815-1-dietmar.eggemann@arm.com> 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 Hi Dietmar, On Fri, Apr 06, 2018 at 04:36:01PM +0100, Dietmar Eggemann wrote: > 1. Overview > > The Energy Aware Scheduler (EAS) based on Morten Rasmussen's posting on > LKML [1] is currently part of the AOSP Common Kernel and runs on > today's smartphones with Arm's big.LITTLE CPUs. > Based on the experience gained over the last two and a half years in > product development, we propose an energy model based task placement > for CPUs with asymmetric core capacities (e.g. Arm big.LITTLE or > DynamIQ), to align with the EAS adopted by the AOSP Common Kernel. We > have developed a simplified energy model, based on the physical > active power/performance curve of each core type using existing > SoC power/performance data already known to the kernel. The energy > model is used to select the most energy-efficient CPU to place each > task, taking utilization into account. > > 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/ [...] > 2.1.1 Hikey960 > > Energy is measured with an ACME Cape on an instrumented board. Numbers > include consumption of big and little CPUs, LPDDR memory, GPU and most > of the other small components on the board. They do not include > consumption of the radio chip (turned-off anyway) and external > connectors. So the measurement point on Hikey960 is for SoC but not for whole board, right? > +----------+-----------------+-------------------------+ > | | Without patches | With patches | > +----------+--------+--------+------------------+------+ > | Tasks nb | Mean | RSD* | Mean | RSD* | > +----------+--------+--------+------------------+------+ > | 10 | 41.14 | 1.4% | 36.51 (-11.25%) | 1.6% | > | 20 | 55.95 | 0.8% | 50.14 (-10.38%) | 1.9% | > | 30 | 74.37 | 0.2% | 72.89 ( -1.99%) | 5.3% | > | 40 | 94.12 | 0.7% | 87.78 ( -6.74%) | 4.5% | > | 50 | 117.88 | 0.2% | 111.66 ( -5.28%) | 0.9% | > +----------+--------+-------+-----------------+--------+ > > 2.1.2 Juno r0 > > Energy is measured with the onboard energy meter. Numbers include > consumption of big and little CPUs. > > +----------+-----------------+-------------------------+ > | | Without patches | With patches | > +----------+--------+--------+------------------+------+ > | Tasks nb | Mean | RSD* | Mean | RSD* | > +----------+--------+--------+------------------+------+ > | 10 | 11.25 | 3.1% | 7.07 (-37.16%) | 2.1% | > | 20 | 19.18 | 1.1% | 12.75 (-33.52%) | 2.2% | > | 30 | 28.81 | 1.9% | 21.29 (-26.10%) | 1.5% | > | 40 | 36.83 | 1.2% | 30.72 (-16.59%) | 0.6% | > | 50 | 46.41 | 0.6% | 46.02 ( -0.01%) | 0.5% | > +----------+--------+--------+------------------+------+ > > 2.2 Performance test case > > 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? [...] Thanks, Leo Yan