From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933061AbeCFOHG (ORCPT ); Tue, 6 Mar 2018 09:07:06 -0500 Received: from mga12.intel.com ([192.55.52.136]:39091 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbeCFOHE (ORCPT ); Tue, 6 Mar 2018 09:07:04 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,431,1515484800"; d="scan'208";a="205914454" Subject: Re: [RFC/RFT][PATCH 4/7] cpuidle: menu: Split idle duration prediction from state selection To: Peter Zijlstra Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Thomas Gleixner , Frederic Weisbecker , Paul McKenney , Thomas Ilsche , Doug Smythies , Rik van Riel , Mike Galbraith , LKML , Linux PM References: <1657351.s4RTvEoqBQ@aspire.rjw.lan> <2332986.m9oRvTSu8E@aspire.rjw.lan> <20180305113803.GO25201@hirez.programming.kicks-ass.net> <20180305125012.GA25181@hirez.programming.kicks-ass.net> <20180305135322.GV25201@hirez.programming.kicks-ass.net> <43825f88-762e-11e5-d70a-45152b95599d@linux.intel.com> <20180306084536.GZ25201@hirez.programming.kicks-ass.net> From: "Li, Aubrey" Message-ID: <73d0ffca-7496-12f3-e1b7-a96494507817@linux.intel.com> Date: Tue, 6 Mar 2018 22:07:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20180306084536.GZ25201@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/3/6 16:45, Peter Zijlstra wrote: > On Tue, Mar 06, 2018 at 10:15:10AM +0800, Li, Aubrey wrote: >> On 2018/3/5 21:53, Peter Zijlstra wrote: >>> On Mon, Mar 05, 2018 at 02:05:10PM +0100, Rafael J. Wysocki wrote: >>>> On Mon, Mar 5, 2018 at 1:50 PM, Peter Zijlstra wrote: >>>>> On Mon, Mar 05, 2018 at 12:47:23PM +0100, Rafael J. Wysocki wrote: >>> >>>>>> IOW, the target residency of the selected state doesn't tell you how >>>>>> much time you should expect to be idle in general. >>>>> >>>>> Right, but I think that measure isn't of primary relevance. What we want >>>>> to know is: 'should I stop the tick' and 'what C state do I go to'. >> >> I understood the benefit of mapping duration to state number, is duration <-> >> state number mapping a generic solution to all arches? > > Yes, all platforms have a limited set of possible idle states. > >> Back to the user's concern is, "I'm running a latency sensitive application, and >> I want idle switching ASAP". So I think the user may not care about what C state >> to go into, that is, even if a deeper state has chance to go, the user striving >> for a higher workload score may still not want it? > > The user caring about performance very much cares about the actual idle > state too, exit latency for deeper states is horrific and will screw > them up just as much as the whole nohz timer reprogramming does. > > We can basically view the whole nohz thing as an additional entry/exit > latency for the idle state, which is why I don't think its weird to > couple them. okay, I see your point now. Thanks! > >>>> Maybe just return a "nohz" indicator from cpuidle_select() in addition >>>> to the state index and make the decision in the governor? >>> >>> Much better option than returning a duration :-) >>> >> So what does "nohz = disable and state index = deepest" mean? This combination >> does not make sense for performance only purpose? > > I tend to agree with you that the state space allowed by a separate > variable is larger than required, but it's significantly smaller than > preserving 'time' so I can live with it. >