Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753629AbYLZIry (ORCPT ); Fri, 26 Dec 2008 03:47:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752966AbYLZIrq (ORCPT ); Fri, 26 Dec 2008 03:47:46 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:47124 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752930AbYLZIrp (ORCPT ); Fri, 26 Dec 2008 03:47:45 -0500 Subject: Re: TSC not updating after resume: Bug or Feature? From: Peter Zijlstra To: Pavel Machek Cc: Thomas Gleixner , Fabio Comolli , Ingo Molnar , "Rafael J. Wysocki" , Steven Rostedt , dsaxena@plexity.net, LKML , Dave Kleikamp , toralf.foerster@gmx.de In-Reply-To: <20081224140900.GA1624@ucw.cz> References: <20081222150021.GA13839@elte.hu> <20081224140900.GA1624@ucw.cz> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 26 Dec 2008 09:47:21 +0100 Message-Id: <1230281241.9487.266.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2272 Lines: 48 On Wed, 2008-12-24 at 15:09 +0100, Pavel Machek wrote: > Hi! > > > > > > > > Can please you revert the last patch and apply the following ? Does > > > > the WARN_ON trigger ? > > > > > > > > > Yes, it does: > > > > > [ 159.768005] [] getnstimeofday+0x21/0xcd > > > [ 159.768005] [] ktime_get_ts+0x1d/0x3f > > > [ 159.768005] [] ktime_get+0xf/0x2b > > > [ 159.768005] [] sched_clock_tick+0x46/0x83 > > > [ 159.768005] [] sched_clock_idle_wakeup_event+0x5/0xa > > > [ 159.768005] [] set_cyc2ns_scale+0x3f/0x5e > > > [ 159.768005] [] time_cpufreq_notifier+0xf9/0x103 > > > [ 159.768005] [] notifier_call_chain+0x2a/0x52 > > > [ 159.768005] [] __srcu_notifier_call_chain+0x35/0x4a > > > [ 159.768005] [] srcu_notifier_call_chain+0x9/0xc > > > [ 159.768005] [] cpufreq_resume+0xf3/0x112 > > > [ 159.768005] [] __sysdev_resume+0x24/0x34 > > > [ 159.768005] [] sysdev_resume+0x1e/0x50 > > > > Thanks for testing. It's exaclty the code path I described :) > > > > So my code analysis holds and your test confirms my suspicion that > > Shaggy's patch just unearthed some other weirdness in the > > suspend/resume code. > > > > Can you please apply the following hack^Wpatch and retest ? It > > restores Shaggys patch, but prevents the sched_clock_tick() call when > > timekeeping is not resumed. The WARN_ON should not longer trigger > > except there is some other code path which fiddles with that as well. > > > > If I'm not completely nuts then this should solve your suspend/resume > > problem really instead of papering over the root cause. > > Should we move timekeeping resume before cpufreq resume, instead of this? That seems a sensible suggestion (but I've got no clue on how practical that is). A quick look at the boot code suggests that regular bootups have that sequence as well, so mirroring that in the resume code seems like the best all-round solution. -- 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/