Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696AbbKPPHs (ORCPT ); Mon, 16 Nov 2015 10:07:48 -0500 Received: from www.linutronix.de ([62.245.132.108]:41087 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbbKPPHq (ORCPT ); Mon, 16 Nov 2015 10:07:46 -0500 Date: Mon, 16 Nov 2015 16:06:57 +0100 (CET) From: Thomas Gleixner To: Jacob Pan cc: Peter Zijlstra , Ingo Molnar , John Stultz , LKML , Arjan van de Ven , Srinivas Pandruvada , Len Brown , Rafael Wysocki , Eduardo Valentin , Paul Turner Subject: Re: [PATCH 2/4] timer: relax tick stop in idle entry In-Reply-To: <20151113142438.3144d47d@icelake> Message-ID: References: <1447444387-23525-1-git-send-email-jacob.jun.pan@linux.intel.com> <1447444387-23525-3-git-send-email-jacob.jun.pan@linux.intel.com> <20151113142438.3144d47d@icelake> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1529 Lines: 34 On Fri, 13 Nov 2015, Jacob Pan wrote: > -0 [000] 30.093473: bprint: __tick_nohz_idle_enter: JPAN: __tick_nohz_idle_enter 803 > -0 [000] 30.093473: bprint: __tick_nohz_idle_enter: JPAN: can_stop_idle_tick 743 > [JP] can_stop_idle_tick() checks ok to stop tick > > -0 [000] 30.093474: bprint: __tick_nohz_idle_enter: JPAN: tick_nohz_stop_sched_tick 609 delta 1000000 > [JP] but sees delta is exactly 1 tick away. didn't stop tick. If the delta is 1 tick then it is not supposed to stop it. Did you ever try to figure out WHY it is 1 tick? There are two code pathes which can set it to basemono + TICK_NSEC: if (rcu_needs_cpu(basemono, &next_rcu) || arch_needs_cpu() || irq_work_needs_cpu()) { next_tick = basemono + TICK_NSEC; } else { next_tmr = get_next_timer_interrupt(basejiff, basemono); ts->next_timer = next_tmr; /* Take the next rcu event into account */ next_tick = next_rcu < next_tmr ? next_rcu : next_tmr; } Can you please figure out WHY the tick is requested to continue instead of blindly wreckaging the logic in that code? Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/