Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 17 Jul 2002 17:12:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 17 Jul 2002 17:12:13 -0400 Received: from dsl-213-023-038-064.arcor-ip.net ([213.23.38.64]:28351 "EHLO starship") by vger.kernel.org with ESMTP id ; Wed, 17 Jul 2002 17:12:12 -0400 Content-Type: text/plain; charset=US-ASCII From: Daniel Phillips To: Linus Torvalds , "Richard B. Johnson" Subject: Re: HZ, preferably as small as possible Date: Wed, 17 Jul 2002 23:16:25 +0200 X-Mailer: KMail [version 1.3.2] Cc: References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 25 On Wednesday 17 July 2002 23:02, Linus Torvalds wrote: > On Wed, 17 Jul 2002, Richard B. Johnson wrote: > > > > It is hardly novel and I can't imagine how Bresenham or whomever > > could make such a claim to the obvious. Even the DOS writer(s) used > > this technique to get one-second time intervals from the 18.206 > > ticks/per second. > > Ehh.. Look at _existing_ linux code to do exactly the same. > > See update_wall_time_one_tick() and second_overflow() (which does a lot > more besides, but it does largely boil down to this "average fractions > using basic integer math" thing. I see lots of stuff in there all right, but I don't see anything that implements the numerator/denominator error analysis technique I described above. Maybe I just didn't look hard enough. -- Daniel - 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/