From owner-freebsd-arch@FreeBSD.ORG Mon Sep 7 05:43:16 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E9A410656B8 for ; Mon, 7 Sep 2009 05:43:16 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (hergotha.csail.mit.edu [66.92.79.170]) by mx1.freebsd.org (Postfix) with ESMTP id 254128FC1F for ; Mon, 7 Sep 2009 05:43:15 +0000 (UTC) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.2/8.14.2) with ESMTP id n875Fc9f048328; Mon, 7 Sep 2009 01:15:38 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.2/8.13.8/Submit) id n875Fct3048327; Mon, 7 Sep 2009 01:15:38 -0400 (EDT) (envelope-from wollman) Date: Mon, 7 Sep 2009 01:15:38 -0400 (EDT) From: Garrett Wollman Message-Id: <200909070515.n875Fct3048327@hergotha.csail.mit.edu> To: rizzo@iet.unipi.it X-Newsgroups: mit.lcs.mail.freebsd-stable In-Reply-To: <20090906155154.GA8283@onelab2.iet.unipi.it> Organization: None X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hergotha.csail.mit.edu [127.0.0.1]); Mon, 07 Sep 2009 01:15:38 -0400 (EDT) X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hergotha.csail.mit.edu Cc: arch@freebsd.org Subject: Re: incorrect usleep/select delays with HZ > 2500 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 05:43:16 -0000 In article <20090906155154.GA8283@onelab2.iet.unipi.it> you write: >(this problem seems to affect both current and -stable, >so let's see if here i have better luck) > >I just noticed [Note 1,2] that when setting HZ > 2500 (even if it is >an exact divisor of the APIC/CPU clock) there is a significant >drift between the delays generated by usleep()/select() and those >computed by gettimeofday(). In other words, the error grows with >the amount of delay requested. If I may be so bold as to suggest: if you think you want HZ > 1000, you're probably wrong. -GAWollman -- Garrett A. Wollman | What intellectual phenomenon can be older, or more oft wollman@bimajority.org| repeated, than the story of a large research program Opinions not shared by| that impaled itself upon a false central assumption my employers. | accepted by all practitioners? - S.J. Gould, 1993