Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752578AbdGLSKV (ORCPT ); Wed, 12 Jul 2017 14:10:21 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36448 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbdGLSKU (ORCPT ); Wed, 12 Jul 2017 14:10:20 -0400 Date: Wed, 12 Jul 2017 20:10:09 +0200 From: Peter Zijlstra To: Frederic Weisbecker Cc: Christoph Lameter , "Li, Aubrey" , Andi Kleen , Aubrey Li , tglx@linutronix.de, len.brown@intel.com, rjw@rjwysocki.net, tim.c.chen@linux.intel.com, arjan@linux.intel.com, paulmck@linux.vnet.ibm.com, yang.zhang.wz@gmail.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods Message-ID: <20170712181009.6whvudhqzo7iuvza@hirez.programming.kicks-ass.net> References: <1499650721-5928-1-git-send-email-aubrey.li@intel.com> <20170710084647.zs6wkl3fumszd33g@hirez.programming.kicks-ass.net> <20170710144609.GD31832@tassilo.jf.intel.com> <20170710164206.5aon5kelbisxqyxq@hirez.programming.kicks-ass.net> <20170710172705.GA3441@tassilo.jf.intel.com> <20170711094157.5xcwkloxnjehieqv@hirez.programming.kicks-ass.net> <20170711160926.GA18805@lerouge> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170711160926.GA18805@lerouge> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 648 Lines: 20 On Tue, Jul 11, 2017 at 06:09:27PM +0200, Frederic Weisbecker wrote: > So I'd rather put that on can_stop_idle_tick(). That function needs a fix.. That's not in fact an identity (although it turns out it is for the 4 default HZ values). diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index c7a899c5ce64..91433bc4a723 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -882,7 +882,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) } if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) { - ts->sleep_length = NSEC_PER_SEC / HZ; + ts->sleep_length = TICK_NSEC; return false; }