Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935878AbdGTQC7 (ORCPT ); Thu, 20 Jul 2017 12:02:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49681 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933887AbdGTQC6 (ORCPT ); Thu, 20 Jul 2017 12:02:58 -0400 Date: Thu, 20 Jul 2017 09:02:51 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: "Li, Aubrey" , Thomas Gleixner , Andi Kleen , 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: <34371ef8-b8bc-d2bf-93de-3fccd6beb032@linux.intel.com> <20170718044521.GO3441@tassilo.jf.intel.com> <20170718152014.GB3981@linux.vnet.ibm.com> <20170719144827.GB3730@linux.vnet.ibm.com> <20170720125054.GN3730@linux.vnet.ibm.com> <20170720141940.4vhih472if5ikdi4@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170720141940.4vhih472if5ikdi4@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17072016-0052-0000-0000-000002434731 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007393; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00890348; UDB=6.00444822; IPR=6.00670516; BA=6.00005482; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016299; XFM=3.00000015; UTC=2017-07-20 16:02:55 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17072016-0053-0000-0000-000051648362 Message-Id: <20170720160251.GP3730@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-20_08:,, 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-1707200248 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1020 Lines: 36 On Thu, Jul 20, 2017 at 04:19:40PM +0200, Peter Zijlstra wrote: > On Thu, Jul 20, 2017 at 05:50:54AM -0700, Paul E. McKenney wrote: > > > > > > static void cpuidle_idle_call() > > > { > > > rcu_idle_enter() > > > ...... > > > rcu_idle_exit() > > > } > > > > > > I want > > > > > > static void cpuidle_idle_call() > > > { > > > if (tick stopped) > > > rcu_idle_enter() > > > ...... > > > if (tick stopped) > > > rcu_idle_exit() > > > } > > > > > > Or checking tick stop can be put into rcu_idle_enter/exit > > > > The answer is the traditional "it depends". > > > > If the above change was all that you did, that would be a bug in the > > case where the predicted short idle time turned out to in reality be an > > indefinite idle time. > > Can't be, you didn't disable the tick after all, so you're guaranteed to > get interrupted by the tick and try again. I will reserve judgment on that until I see the patch. But to your point, I would indeed hope that it works that way. ;-) Thanx, Paul