From owner-svn-src-head@FreeBSD.ORG Tue Dec 15 13:29:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2EF11065679; Tue, 15 Dec 2009 13:29:04 +0000 (UTC) (envelope-from pdegoeje@service2media.com) Received: from s2m-is-001.service2media.com (rev-130-102.virtu.nl [217.114.102.130]) by mx1.freebsd.org (Postfix) with ESMTP id 66C4C8FC08; Tue, 15 Dec 2009 13:29:03 +0000 (UTC) Received: from pieter-dev-linux.localnet ([10.0.1.18] RDNS failed) by s2m-is-001.service2media.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 15 Dec 2009 14:16:56 +0100 From: Pieter de Goeje Organization: Service2Media To: svn-src-all@freebsd.org Date: Tue, 15 Dec 2009 14:16:56 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31-16-generic; KDE/4.3.2; i686; ; ) References: <200912141223.nBECNlDZ026381@svn.freebsd.org> <20091214144635.GA91618@onelab2.iet.unipi.it> In-Reply-To: <20091214144635.GA91618@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912151416.56348.pieter@service2media.com> X-OriginalArrivalTime: 15 Dec 2009 13:16:56.0977 (UTC) FILETIME=[E08BE810:01CA7D88] Cc: svn-src-head@freebsd.org, Robert Watson , Luigi Rizzo , src-committers@freebsd.org, Luigi Rizzo Subject: Re: svn commit: r200510 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2009 13:29:04 -0000 On Monday 14 December 2009 15:46:35 Luigi Rizzo wrote: > On Mon, Dec 14, 2009 at 02:18:42PM +0000, Robert Watson wrote: > > On Mon, 14 Dec 2009, Luigi Rizzo wrote: > > ... > > > > Together with a smaller patch committed in september, this fixes a > > > bug that affects 8.0 with apps that rely on callouts to fire exactly > > > in the number of ticks specified (qemu among them). > > > Right now, callouts in 8.0 fire one tick late. > > > > > > This was discussed in september with JeffR and jhb > > > > Once this has burned in, is it something you would consider appropriate > > to be an errata note candidate? > > i have no objection, but at the time someone commented that > callouts do not _guarantee_ when they will run so strictly speaking > this is not a bug (i do think that being always a tick late _is_ a bug). As a person running a couple of game servers which rely on nanosleep to get a fixed number of frames per second, I'd say that it is a bug. This might also affect video players which want to show their frames on time. The default HZ of 1000 mitigates the problem somewhat, but on for example a laptop running at HZ=100 the error is noticeable. To illustrate my point, calling usleep(1) 100 times in a loop results in a running time of 3 seconds with kern.hz=100 (measured on 8.x from Dec 9th), which is 3 times as long as one might reasonably expect. This suggests that the callout fires 2 ticks late ... - Pieter de Goeje