Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbdGRPUY (ORCPT ); Tue, 18 Jul 2017 11:20:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59833 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413AbdGRPUX (ORCPT ); Tue, 18 Jul 2017 11:20:23 -0400 Date: Tue, 18 Jul 2017 08:20:14 -0700 From: "Paul E. McKenney" To: "Li, Aubrey" Cc: Thomas Gleixner , Andi Kleen , Peter Zijlstra , Frederic Weisbecker , Christoph Lameter , Aubrey Li , len.brown@intel.com, rjw@rjwysocki.net, tim.c.chen@linux.intel.com, arjan@linux.intel.com, yang.zhang.wz@gmail.com, x86@kernel.org, linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org Subject: Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods Reply-To: paulmck@linux.vnet.ibm.com References: <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> <34371ef8-b8bc-d2bf-93de-3fccd6beb032@linux.intel.com> <20170718044521.GO3441@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17071815-0048-0000-0000-000001C61A0B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007381; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00889379; UDB=6.00444243; IPR=6.00669551; BA=6.00005479; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016262; XFM=3.00000015; UTC=2017-07-18 15:20:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071815-0049-0000-0000-000041EDCCF7 Message-Id: <20170718152014.GB3981@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-18_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707180243 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2358 Lines: 53 On Tue, Jul 18, 2017 at 02:56:47PM +0800, Li, Aubrey wrote: > On 2017/7/18 14:43, Thomas Gleixner wrote: > > On Mon, 17 Jul 2017, Andi Kleen wrote: > > > >>> We need a tradeoff here IMHO. I'll check Daniel's work to understand how/if > >>> it's better than menu governor. > >> > >> I still would like to see how the fast path without the C1 heuristic works. > >> > >> Fast pathing is a different concept from a better predictor. IMHO we need > >> both, but the first is likely lower hanging fruit. > > > > Hacking something on the side is always the lower hanging fruit as it > > avoids solving the hard problems. As Peter said already, that's not going > > to happen unless there is a real technical reason why the general path > > cannot be fixed. So far there is no proof for that. > > > Let me try to make a summary, please correct me if I was wrong. > > 1) for quiet_vmstat, we are agreed to move to another place where tick is > really stopped. > > 2) for rcu idle enter/exit, I measured the details which Paul provided, and > the result matches with what I have measured before, nothing notable found. > But it still makes more sense if we can make rcu idle enter/exit hooked with > tick off. (it's possible other workloads behave differently) Again, assuming that RCU is informed of CPUs in the kernel, regardless of whether or not the tick is on that that point in time. Thanx, Paul > 3) for tick nohz idle, we want to skip if the coming idle is short. If we can > skip the tick nohz idle, we then skip all the items depending on it. But, there > are two hard points: > > 3.1) how to compute the period of the coming idle. My current proposal is to > use two factors in the current idle menu governor. There are two possible > options from Peter and Thomas, the one is to use scheduler idle estimate, which > is task activity based, the other is to use the statistics generated from irq > timings work. > > 3.2) how to determine if the idle is short or long. My current proposal is to > use a tunable value via /sys, while Peter prefers an auto-adjust mechanism. I > didn't get the details of an auto-adjust mechanism yet > > 4) for idle loop, my proposal introduces a simple one to use default idle > routine directly, while Peter and Thomas suggest we fix c-state selection > in the existing idle path. > > Thanks, > -Aubrey >