From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262378AbVGNXYU (ORCPT ); Thu, 14 Jul 2005 19:24:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261761AbVGNXWt (ORCPT ); Thu, 14 Jul 2005 19:22:49 -0400 Received: from smtp.osdl.org ([65.172.181.4]:24002 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S262758AbVGNXU5 (ORCPT ); Thu, 14 Jul 2005 19:20:57 -0400 Date: Thu, 14 Jul 2005 16:19:06 -0700 (PDT) From: Linus Torvalds To: Alan Cox cc: john stultz , Arjan van de Ven , Vojtech Pavlik , Lee Revell , dean gaudet , Chris Wedgwood , Andrew Morton , Len Brown , dtor_core@ameritech.net, david.lang@digitalinsight.com, davidsen@tmr.com, kernel@kolivas.org, lkml , mbligh@mbligh.org, diegocg@gmail.com, azarah@nosferatu.za.org, christoph@lameter.com Subject: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt In-Reply-To: <1121381026.3747.14.camel@localhost.localdomain> Message-ID: References: <1121286258.4435.98.camel@mindpipe> <20050713134857.354e697c.akpm@osdl.org> <20050713211650.GA12127@taniwha.stupidest.org> <20050714005106.GA16085@taniwha.stupidest.org> <1121304825.4435.126.camel@mindpipe> <1121326938.3967.12.camel@laptopd505.fenrus.org> <20050714121340.GA1072@ucw.cz> <1121360561.3967.55.camel@laptopd505.fenrus.org> <1121370122.7673.161.camel@cog.beaverton.ibm.com> <1121381026.3747.14.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Jul 2005, Alan Cox wrote: > > I suspect the problem for some of this is that people think of jiffies > as incrementing by 1. If HZ is right then jiffies can be in nS, it just > won't increment by 1. No, jiffies _cannot_ be in nS, because of the fact that then it doesn't fit in a word any more. A lot of things want timeouts in the tens of minutes, and a jiffy clock that tries to ne in nS just screws that up entirely, and forces people to use u64. Which is much more expensive to compare on 32-bit architectures due to nasty atomicity issues. So you want to keep the "normal" timeout 32-bit. In ten years we may not care any more. For the forseeable future we definitely do. > Its also why jiffies() is better on some platforms > because many machines can answer "what time is it" far more accurately > than they can set interrupts. That's not what "jiffies" are about. If you want accurate time, use something else, like gettimeofday. The timeouts are _only_ relevant on the scale of a timer interrupt, since by definition that's what we're waiting for. So accuracy is a total non-issue. The only kind of accuracy we care about is "how often can the timer ticks happen". Linus