Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933638AbdGTBlU (ORCPT ); Wed, 19 Jul 2017 21:41:20 -0400 Received: from mga05.intel.com ([192.55.52.43]:8029 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932089AbdGTBlT (ORCPT ); Wed, 19 Jul 2017 21:41:19 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,382,1496127600"; d="scan'208";a="1174574992" Subject: Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods To: paulmck@linux.vnet.ibm.com 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 References: <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> <20170718152014.GB3981@linux.vnet.ibm.com> <20170719144827.GB3730@linux.vnet.ibm.com> From: "Li, Aubrey" Message-ID: Date: Thu, 20 Jul 2017 09:40:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170719144827.GB3730@linux.vnet.ibm.com> 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 Content-Length: 1511 Lines: 50 On 2017/7/19 22:48, Paul E. McKenney wrote: > On Wed, Jul 19, 2017 at 01:44:06PM +0800, Li, Aubrey wrote: >> On 2017/7/18 23:20, Paul E. McKenney wrote: >> >>>> 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. >>> >> Yeah, I see, no problem for a normal idle. >> >> But for a short idle, we want to return to the task ASAP. Even though RCU cost >> is not notable, it would still be better for me if we can save some cycles in >> idle entry and idle exit. >> >> Do we have any problem if we skip RCU idle enter/exit under a fast idle scenario? >> My understanding is, if tick is not stopped, then we don't need inform RCU in >> idle path, it can be informed in irq exit. > > Indeed, the problem arises when the tick is stopped. My question is, does problem arise when the tick is *not* stopped (skipping nohz idle)? instead of 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 Thanks, -Aubrey