Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbVJTIBG (ORCPT ); Thu, 20 Oct 2005 04:01:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751785AbVJTIBG (ORCPT ); Thu, 20 Oct 2005 04:01:06 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:39578 "EHLO mx2.mail.elte.hu") by vger.kernel.org with ESMTP id S1751784AbVJTIBF (ORCPT ); Thu, 20 Oct 2005 04:01:05 -0400 Date: Thu, 20 Oct 2005 10:01:07 +0200 From: Ingo Molnar To: Steven Rostedt Cc: john stultz , tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards. Message-ID: <20051020080107.GA31342@elte.hu> References: <1129734626.19559.275.camel@tglx.tec.linutronix.de> <1129747172.27168.149.camel@cog.beaverton.ibm.com> <20051020073416.GA28581@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-ELTE-SpamScore: 0.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=0.0 required=5.9 tests=AWL autolearn=disabled SpamAssassin version=3.0.4 0.0 AWL AWL: From: address is in the auto white-list X-ELTE-VirusStatus: clean Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1225 Lines: 35 * Steven Rostedt wrote: > > i could imagine the following hardware effects to cause time warps: > > > > - the TSC is in fact the 'read counter' method of the local APIC timer > > hardware. So there can be interactions in theory: programming the APIC > > timer could impact the TSC and vice versa. There have been CPU > > erratums in this area in the past. > > Could this cause a 2 second drop backwards? i dont think so. > > - the TSC itself could have short, temporary warps. I had a box that > > showed such effects. > > Can this be a 2 second warp? the ones i saw were in the 1000-cycles range. > My older code first used jiffies as a timer, then I switched to TSC > and then to APIC timer, and then finally ktimer. ktimer was the first > to show a backwards get_time. another thing: the monotonicity check is only in get_ktime_mono(), while there are other places where a monotonic clock is used, which this check might miss. Ingo - 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/