Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbdGQTvx (ORCPT ); Mon, 17 Jul 2017 15:51:53 -0400 Received: from mga09.intel.com ([134.134.136.24]:34798 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbdGQTvv (ORCPT ); Mon, 17 Jul 2017 15:51:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,375,1496127600"; d="scan'208";a="994009716" Subject: Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods To: Thomas Gleixner References: <20170713083649.febfflfl5hafkko5@hirez.programming.kicks-ass.net> <16e12e23-6b28-f174-7c4b-4d719225cd3b@linux.intel.com> <20170713145311.z4zxlyd2dospeoqg@hirez.programming.kicks-ass.net> <4a577bd6-20b1-abb6-2153-f9870f0a721e@linux.intel.com> <20170713182820.sn3fjitnd3mca27p@hirez.programming.kicks-ass.net> <31170ac6-9db1-f0b8-4841-f1661c8ed6e1@linux.intel.com> <20170714153818.pjauqxebxyhs6ljp@hirez.programming.kicks-ass.net> <20170714155356.GH3441@tassilo.jf.intel.com> <20170714160648.tg2u6eo2id6gmnjz@hirez.programming.kicks-ass.net> <20170714162619.GJ3441@tassilo.jf.intel.com> <20170717192309.ubn5muvc3u7htuaw@hirez.programming.kicks-ass.net> <91d02dce-7a3c-371c-a247-55fce1e7124a@linux.intel.com> Cc: Peter Zijlstra , Andi Kleen , "Li, Aubrey" , Frederic Weisbecker , Christoph Lameter , Aubrey Li , len.brown@intel.com, rjw@rjwysocki.net, tim.c.chen@linux.intel.com, paulmck@linux.vnet.ibm.com, yang.zhang.wz@gmail.com, x86@kernel.org, linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org From: Arjan van de Ven Message-ID: Date: Mon, 17 Jul 2017 12:51:44 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1639 Lines: 34 On 7/17/2017 12:46 PM, Thomas Gleixner wrote: > On Mon, 17 Jul 2017, Arjan van de Ven wrote: >> On 7/17/2017 12:23 PM, Peter Zijlstra wrote: >>> Now I think the problem is that the current predictor goes for an >>> average idle duration. This means that we, on average, get it wrong 50% >>> of the time. For performance that's bad. >> >> that's not really what it does; it looks at next tick >> and then discounts that based on history; >> (with different discounts for different order of magnitude) > > next tick is the worst thing to look at for interrupt heavy workloads as well it was better than what was there before (without discount and without detecting repeated patterns) > the next tick (as computed by the nohz code) can be far away, while the I/O > interrupts come in at a high frequency. > > That's where Daniel Lezcanos work of predicting interrupts comes in and > that's the right solution to the problem. The core infrastructure has been > merged, just the idle/cpufreq users are not there yet. All you need to do > is to select CONFIG_IRQ_TIMINGS and use the statistics generated there. > yes ;-) also note that the predictor does not need to perfect, on most systems C states are an order of magnitude apart in terms of power/performance/latency so if you get the general order of magnitude right the predictor is doing its job. (this is not universally true, but physics of power gating/etc tend to drive to this conclusion; the cost of implementing an extra state very close to another state means that the HW folks are unlikely to do the less power saving state of the two to save their cost and testing effort)