Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7599250imu; Mon, 3 Dec 2018 15:53:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/X/ap8ls8qWe9llJLIEAFNgcBoAxOkA1BBbw6/XX2HqIsy54J9+P9kQ4M26WtMaibrDO3Yl X-Received: by 2002:a62:59c9:: with SMTP id k70mr17759287pfj.243.1543881219626; Mon, 03 Dec 2018 15:53:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543881219; cv=none; d=google.com; s=arc-20160816; b=uYbXRTWpILlMfiiLLOt0oqvr6IIO0ePLrxHYJIyOqodsL+cWec0U6a5QPx9BpisE95 LZwdMcp5kk/haeC3kwq4v47EGHoR2W8lKNhBWRuG+ZDf6FYPjfThmShmQoH/I2/fDIHX CjM7wOxx5PjQVzcnkxsyCkCROSySm+/Kz210T6mbSejTD6J+xSmIwaVzIrB8hj4rhFSd ZuYRf71G9BWqCWvZFloRBmKkISqu555CYitQflCcI8cTEzByzj87CYyV6SsKU24M+kkw 3hANWxufG1EHGvCRD0aJq85bzDCy89el3iwYuSR5r1yPiaWbn2s2k1jxHSqwA0vtDEaG DVeg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mpIGFz6W4HIS6BvrvbA6gRKCgH+Kkg+XhOjOVTCU1MM=; b=E5MPyp9UaBkJ8glgUUBeT/17SzHIc7Z90Bp7CRIOZeMi1+ghVfr+O70I7qej2fpd0M AP2eFLMXGpp8JvwDY50+o3JeQQHq46F+Fxyf2V+arQsdYof3LN4XRyb7o2aKUtv5SFZQ dFy14x/Q4iweMQhfx1J7py0c/m8c2Zpphrqr458vohXnJQ17lsaRBBlRUYCudllGUBNl NTexkvohCS12rsJxGyEQjAcYTAm50btCYjCazC9K0BCVr6UiASktBtuzQmwUYRzjgy38 u64qiIrm+NpubXY35k4yPToqNPK4tRzClv6kD+3CvfrLL7RcAB+bUw06tknzwieCWSDU 4ZOw== 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 w24si8496080pgj.582.2018.12.03.15.53.24; Mon, 03 Dec 2018 15:53:39 -0800 (PST) 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 S1726154AbeLCXwf (ORCPT + 99 others); Mon, 3 Dec 2018 18:52:35 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:59285 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbeLCXwf (ORCPT ); Mon, 3 Dec 2018 18:52:35 -0500 Received: from 79.184.252.87.ipv4.supernova.orange.pl (79.184.252.87) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.157) id ff620aba00623980; Tue, 4 Dec 2018 00:52:32 +0100 From: "Rafael J. Wysocki" To: Doug Smythies Cc: 'Giovanni Gherdovich' , 'Srinivas Pandruvada' , 'Peter Zijlstra' , 'LKML' , 'Frederic Weisbecker' , 'Mel Gorman' , 'Daniel Lezcano' , 'Linux PM' Subject: Re: [RFC/RFT][PATCH v6] cpuidle: New timer events oriented governor for tickless systems Date: Tue, 04 Dec 2018 00:52:22 +0100 Message-ID: <5184824.HpJbX5HyQW@aspire.rjw.lan> In-Reply-To: <002c01d48770$eba6efa0$c2f4cee0$@net> References: <002c01d48770$eba6efa0$c2f4cee0$@net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, November 29, 2018 12:20:07 AM CET Doug Smythies wrote: > On 2018.11.23 02:36 Rafael J. Wysocki wrote: > > v5 -> v6: > * Avoid applying poll_time_limit to non-polling idle states by mistake. > * Use idle duration measured by the governor for everything (as it likely is > more accurate than the one measured by the core). > > -- above missing-- (see follow up e-mail from Rafael) > > * Rename SPIKE to PULSE. > * Do not run pattern detection upfront. Instead, use recent idle duration > values to refine the state selection after finding a candidate idle state. > * Do not use the expected idle duration as an extra latency constraint > (exit latency is less than the target residency for all of the idle states > known to me anyway, so this doesn't change anything in practice). > > Hi Rafael, > > I did some minimal testing on teov6, using kernel 4.20-rc3 as my baseline > reference kernel. > > Test 1: Phoronix bdench test, all options: 1, 6, 12, 48, 128, 256 clients. > > Note: because it uses the disk, the dbench test is somewhat non-repeatable. > However, if particular attention is paid to not doing anything else with > the disk between tests, then it seems to be repeatable to within about 6%. > > Anyway no significant difference observed between kernel 4.20-rc3 and the > same with the teov6 patch. > > Test 2: Pipe test, non cross core. (And idle state 0 test, really) > I ran 4 pipe tests, 1 for each of my 4 cores, @2 CPUs per core. > Thus, pretty much only idle state 0 was ever used. > Processor package power was similar for both kernels. > teov6 entered/exited idle state 0 about 60,984 times/second/cpu. > -rc3 entered/exited idle state 0 about 62,806 times/second/cpu. > There was a difference in percentage time spent in idle state 0, > with kernel 4.20-rc3 spending 0.2441% in idle state 0 verses > teov6 at 0.0641%. > > For throughput, teov6 was 1.4% faster. This may indicate that teov6 is somewhat too aggressive. > Test 3: was an attempt to sweep through a preference for > all idle states. > > 40 threads were launched with nothing to do except sleep > for a variable duration of 1 to 500 uSec, each step was > run for 1 minute. With 1 minute idle before the test and a few > minutes idle after, the total test duration was about 505 minutes. > Recall that when one asks for a short sleep of 1 uSec, they actually > get about 50 uSec, due to overheads. So I use 40 threads in an attempt > to get the average time between wakeup events per CPU down somewhat. > > The results are here: > http://fast.smythies.com/linux-pm/k420/k420-pn-sweep-teo6-2.htm And, so long as my understanding of the graphs is correct, the results here indicate that teov6 tends to prefer relatively shallow idle states which is good for performance (at least with some workloads), but not necessarily for energy-efficiency. I will send a v7 of TEO with some changes to make it a bit more energy-efficient with respect to the v6. Thanks, Rafael