From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262205AbVGNQjE (ORCPT ); Thu, 14 Jul 2005 12:39:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261600AbVGNQjE (ORCPT ); Thu, 14 Jul 2005 12:39:04 -0400 Received: from smtp.osdl.org ([65.172.181.4]:55223 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S262205AbVGNQi3 (ORCPT ); Thu, 14 Jul 2005 12:38:29 -0400 Date: Thu, 14 Jul 2005 09:37:40 -0700 (PDT) From: Linus Torvalds To: Vojtech Pavlik cc: Arjan van de Ven , Lee Revell , dean gaudet , Chris Wedgwood , Andrew Morton , "Brown, Len" , dtor_core@ameritech.net, david.lang@digitalinsight.com, davidsen@tmr.com, kernel@kolivas.org, linux-kernel@vger.kernel.org, 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: <20050714121340.GA1072@ucw.cz> 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> 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, Vojtech Pavlik wrote: > > A note on the relaive timer API: There needs to be a way to say > "x milliseconds from the time this timer should have triggered" instead > of "x milliseconds from now", to avoid skew in timers that try to be > strictly periodic. I disagree. There should be an _absolute_ interface, and a driver that wants that should just have calculated when in time the timeout finishes - and then keep on using the absolute value. Btw, this is exactly why the jiffy-based thing is _good_. The kernel timers _are_ absolute, and you make them relative by adding "jiffies". The fact is, the current timers are better than people give them credit for, and converting them away from a jiffies-based interface (to a usleep-like one) is STUPID. There's absolutely nothing wrong with "jiffies", and anybody who thinks that msleep(20); is fundamentally better than timeout = jiffies + HZ/50; just doesn't realize that the latter is a bit more complicated exactly because the latter is a hell of a lot more POWERFUL. Trying to get rid of jiffies for some religious reason is _stupid_. I have to say, this whole thread has been pretty damn worthless in general in my not-so-humble opinion. Linus