From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 18 19:06:26 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 040ED1065672; Sat, 18 Feb 2012 19:06:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CD7548FC17; Sat, 18 Feb 2012 19:06:24 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA20246; Sat, 18 Feb 2012 21:06:23 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Rypbz-000CZG-Ad; Sat, 18 Feb 2012 21:06:23 +0200 Message-ID: <4F3FF690.5050600@FreeBSD.org> Date: Sat, 18 Feb 2012 21:05:52 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.1) Gecko/20120215 Thunderbird/10.0.1 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: callouts precision X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2012 19:06:26 -0000 Just want to double-check myself. It seems that currently, thanks to event timers, we mostly should be able to schedule a hardware timer to fire at almost arbitrary moment with very fine precision. OTOH, our callout subsystem still seems to be completely tick oriented in the sense that all timeouts are specified and kept in ticks. As a result, it's impossible to use e.g. nanosleep(2) with a precision better than HZ. How deeply ticks are ingrained into callout(9)? Are they used only as a measure of time? Or are there any dependencies on them being integers, like for indexing, etc? In other words, how hard it would be to replace ticks with e.g. bintime as an internal representation of time in callout(9) [leaving interfaces alone for the start]? Is it easier to retrofit that code or to replace it with something new? Thank you. -- Andriy Gapon