From owner-freebsd-current@FreeBSD.ORG Sun Dec 4 17:54:01 2005 Return-Path: X-Original-To: current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF81D16A428 for ; Sun, 4 Dec 2005 17:54:01 +0000 (GMT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [128.30.28.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ECC843D8D for ; Sun, 4 Dec 2005 17:53:41 +0000 (GMT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (localhost.csail.mit.edu [127.0.0.1]) by khavrinen.csail.mit.edu (8.13.1/8.13.4) with ESMTP id jB4HrN8E045333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.csail.mit.edu issuer=Client+20CA); Sun, 4 Dec 2005 12:53:23 -0500 (EST) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.13.1/8.13.4/Submit) id jB4HrM0D045330; Sun, 4 Dec 2005 12:53:22 -0500 (EST) (envelope-from wollman) From: Garrett Wollman MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17299.11538.560643.715262@khavrinen.csail.mit.edu> Date: Sun, 4 Dec 2005 12:53:22 -0500 To: "Poul-Henning Kamp" In-Reply-To: <23153.1130423266@critter.freebsd.dk> References: <20051027140031.L32255@fledge.watson.org> <23153.1130423266@critter.freebsd.dk> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-1.6 (khavrinen.csail.mit.edu [127.0.0.1]); Sun, 04 Dec 2005 12:53:23 -0500 (EST) X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on khavrinen.csail.mit.edu Cc: current@FreeBSD.ORG Subject: Re: MySQL Performance 6.0rc1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2005 17:54:02 -0000 [Picking up a thread from more than a month ago...] < said: > * Additional CLOCK_FOO values for various degraded but fast > timestamps. > Unfortunately, they either force intense versioning of libc or > application source-code changes, so neither is very desirable. This option is not as bad as it sounds. For applications which use clock_gettime() et al it's a trivial change that can easily be hidden behind a preprocessor macro (and probably should be anyway, since most of those applications really want to use something like CLOCK_MONOTONIC iff it's available). I wouldn't be averse to downgrading gettimeofday(). >> Sadly, POSIX doesn't say anything about how applications can express >> preferences about the cost and granularity of time measurement. > Yes, in addition to their other defficiencies [1] the APIs are > somewhat limited in what they can express. I've tried to get the Austin Group interested in improving the clock APIs as a work item. No such luck, but it can't hurt to try some more. What would help greatly would be an actual implementation (e.g., new clock_xxx() functions and CLOCK_xxx constants) and some (even simple) applications that can take advantage of it. These are within the implementation namespace so there door is wide open in that respect. > I've often thought about inventing a new API to solve these problems, > it doesn't take much to do it right, but I have never carried through > on it because adding yet another "FreeBSD-propriety" API is not the > solution we're looking for. All APIs start out that way; the POSIX people have learned (by doing) that committee invention is a bad thing, and are rightfully reluctant to add new interfaces unless they are proven workable by prior implementation. -GAWollman