Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755020Ab2JDW2B (ORCPT ); Thu, 4 Oct 2012 18:28:01 -0400 Received: from mail-da0-f46.google.com ([209.85.210.46]:56303 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752387Ab2JDW17 (ORCPT ); Thu, 4 Oct 2012 18:27:59 -0400 Date: Thu, 4 Oct 2012 15:27:55 -0700 From: Greg Kroah-Hartman To: Peter Zijlstra Cc: Huacai Chen , Charles Wang , Ingo Molnar , stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Seems like "sched: Add missing call to calc_load_exit_idle()" should be reverted in 3.5 branch Message-ID: <20121004222755.GC3609@kroah.com> References: <20121004174626.GB14301@kroah.com> <1349375519.14388.16.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1349375519.14388.16.camel@twins> 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 Content-Length: 2656 Lines: 59 On Thu, Oct 04, 2012 at 08:31:59PM +0200, Peter Zijlstra wrote: > On Thu, 2012-10-04 at 10:46 -0700, Greg Kroah-Hartman wrote: > > On Thu, Oct 04, 2012 at 12:11:01PM +0800, Huacai Chen wrote: > > > Hi, Greg > > > > > > I found that Linux-3.5.5 accept this commit "sched: Add missing call > > > to calc_load_exit_idle()" but I think this isn't needed. Because > > > "5167e8d5417b sched/nohz: Rewrite and fix load-avg computation -- > > > again not fully applied" is true for 3.6 branch, but not for 3.5 > > > branch. > > > > But 5167e8d5417b is in 3.5, so shouldn't this commit still be necessary? > > > > > In 3.5 branch, calc_load_exit_idle() is already called in > > > tick_nohz_idle_exit(), it doesn't need to be called at > > > tick_nohz_update_jiffies() again. In 3.6 branch, some code of > > > tick_nohz_idle_exit() is splitted to tick_nohz_restart_sched_tick() > > > and calc_load_exit_idle() is missing by accident, so commit "sched: > > > Add missing call to calc_load_exit_idle()" is needed. > > > > So this really should be dropped from 3.5? Charles, Peter, Ingo, any > > thoughts here? > > Bah, lots of code movement there recently.. let me try and untangle all > that afresh.. /me checks out v3.5.5. > > OK, assuming ->tick_stopped means what the label says, then we only want > to call calc_load_enter_idle() when it flips to 1 and > calc_load_exit_idle() when it flips back to 0, such that when an actual > tick happens its got correct state. > > Now the actual patch "5167e8d5417b sched/nohz: Rewrite and fix load-avg > computation -- again not fully applied" modifies > tick_nohz_restart_sched_tick() which doesn't appear to exist in v3.5.5 > and the patch fobbed it into tick_nohz_update_jiffies() which is called > from interrupt entry when nohz-idle so that the interrupt (and possible > tailing softirq) see a valid jiffies count. > > However, since we don't restart the tick, we won't be sampling load muck > and calling calc_load_exit_idle() from there is bound to confuse state. > > I hope.. damn this code ;-) > > I can't find wtf went wrong either, the initial patch 5167e8d5417bf5c > contains both hunks, but in that case the fixup 749c8814f0 doesn't make > sense, not can I find anything in merge commits using: > > git log -S calc_load_exit_idle kernel/time/tick-sched.c > > /me puzzled I'm puzzled as well. Any ideas if I should do anything here or not? greg k-h -- 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/