From owner-freebsd-arch@FreeBSD.ORG Sun Dec 2 15:08:44 2007 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 04DD516A418 for ; Sun, 2 Dec 2007 15:08:44 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id BA6DB13C478 for ; Sun, 2 Dec 2007 15:08:43 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 02C0617105; Sun, 2 Dec 2007 15:08:41 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.1/8.14.1) with ESMTP id lB2F8fAm019257; Sun, 2 Dec 2007 15:08:41 GMT (envelope-from phk@critter.freebsd.dk) To: Luigi Rizzo From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 02 Dec 2007 05:50:31 PST." <20071202055031.A8107@xorpc.icir.org> Date: Sun, 02 Dec 2007 15:08:41 +0000 Message-ID: <19256.1196608121@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: New "timeout" api, to replace callout 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: Sun, 02 Dec 2007 15:08:44 -0000 In message <20071202055031.A8107@xorpc.icir.org>, Luigi Rizzo writes: >This is why i suggest having a 'scale' that can represent '1 tick' >(and also don't depend on TIMEOUT_MSEC == 1000 and so on, but keep >them opaque and require that the client code uses one of the supported >scales). Using a deadline timer based in the HPET, the timeout can be scheduled to any 1/14318181th of a second and there will be no concept of "a tick" as we know it now. Clients should say how often they want to be called, and they should express it in terms of time, not based on some implementation detail of a historical implementation of the scheduler. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.