From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbbIRStq (ORCPT ); Fri, 18 Sep 2015 14:49:46 -0400 Received: from mga01.intel.com ([192.55.52.88]:4286 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbbIRStp (ORCPT ); Fri, 18 Sep 2015 14:49:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,554,1437462000"; d="scan'208";a="772064685" Date: Fri, 18 Sep 2015 11:42:13 -0700 From: Yunhong Jiang To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] nohz: make the idle_entrytime/idle_exittime correct Message-ID: <20150918184213.GA31162@jnakajim-build> References: <1442445583-10240-1-git-send-email-yunhong.jiang@linux.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) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2015 at 11:45:37PM +0200, Thomas Gleixner wrote: > On Wed, 16 Sep 2015, Yunhong Jiang wrote: > > > Currently the idle_entrytime is updated on idle_entry, idle_exit and > > get_cpu_idle/iowait_time_us() with non-NULL parameter. This makes the > > idle_entrytime not the real entrytime anymore. The idle_exittiime is > > updated when exit tickless state, which can be idle tickless or full > > tickless. > > If something calls one of the functions then the cpu is not idle. It's > running code. I think the get_cpu_idle/iowait_time_us() can be called from other CPUs. Hmm, I should state this patch as "no idle_entrytime update on get_cpu_idle/iowait_time_us()". If you think this statement is correct, I will re-submit a patch for it. > > > Change the idle_entrytime to be updated only when enter idle, the > > idle_exittime to be updated only when exit idle. Update > > the get_cpu_idle_iowait_time_us() accordingly. > > And the rationale for this change is? I tried to check /proc/timer_list for idle_entrytime/idle_exittime, and noticed this when reading the corresponding code. So no special reason for this change, just correctness. Thanks --jyh > > 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/