Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261927AbVDVCzI (ORCPT ); Thu, 21 Apr 2005 22:55:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261928AbVDVCzI (ORCPT ); Thu, 21 Apr 2005 22:55:08 -0400 Received: from pop.gmx.net ([213.165.64.20]:10218 "HELO mail.gmx.net") by vger.kernel.org with SMTP id S261927AbVDVCzD (ORCPT ); Thu, 21 Apr 2005 22:55:03 -0400 X-Authenticated: #271361 Date: Fri, 22 Apr 2005 04:54:59 +0200 From: Edgar Toernig To: Linus Torvalds Cc: Chris Friesen , Steven Rostedt , Russell King , jdavis@accessline.com, Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Bad rounding in timeval_to_jiffies [was: Re: Odd Timer behavior in 2.6 vs 2.4 (1 extra tick)] Message-Id: <20050422045459.37fb6c41.froese@gmx.de> In-Reply-To: References: <1114052315.5058.13.camel@localhost.localdomain> <1114054816.5996.10.camel@localhost.localdomain> <20050421095109.A25431@flint.arm.linux.org.uk> <1114080708.5996.16.camel@localhost.localdomain> <4267CC7C.10907@nortel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1159 Lines: 29 On Thu, 21 Apr 2005, Chris Friesen wrote: > > Does mainline have a high precision monotonic wallclock that is not > affected by time-of-day changes? Something like "nano/mico seconds > since boot"? On newer kernels with the posix timers (I think 2.6 - not sure though) there's clock_gettime(CLOCK_MONOTONIC, ...). Linus Torvalds wrote: > > Getting "approximate uptime" really really _really_ fast > might be useful for some things, but I don't know how many. I bet most users of gettimeofday actually want a strictly monotonic increasing clock where the actual base time is irrelevant. Just strace some apps - those issuing hundreds and thousands of gettimeofday calls are most likely in this class. Those who only call gettimeofday once or twice or the ones that really want the wall clock time. How often does the kernel use jiffies (the monotonic clock) and how often xtime (the wall clock)? Ciao, ET. - 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/