From owner-freebsd-arch@FreeBSD.ORG Sun Dec 2 11:01:19 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 E3EE416A417; Sun, 2 Dec 2007 11:01:19 +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 A480F13C442; Sun, 2 Dec 2007 11:01:18 +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 BFD6617105; Sun, 2 Dec 2007 11:01:17 +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 lB2B1HZf018130; Sun, 2 Dec 2007 11:01:17 GMT (envelope-from phk@critter.freebsd.dk) To: Robert Watson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 02 Dec 2007 10:47:55 GMT." <20071202103833.N74097@fledge.watson.org> Date: Sun, 02 Dec 2007 11:01:17 +0000 Message-ID: <18129.1196593277@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Attilio Rao , 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 11:01:20 -0000 In message <20071202103833.N74097@fledge.watson.org>, Robert Watson writes: >On Sun, 2 Dec 2007, Poul-Henning Kamp wrote: >> I have no idea what the answer to your question is, I'm focusing on >> providing the ability, how we subsequently decide to use it is up to others. > >Well, I think there is an important question to be discussed regarding >combinatorics, context switching, and the ability to provide multiple callout >threads. I still have no way to answer those questions. My aim here is to provide and implement an client API that will let us play with all those things. There are 444 .c or .h files in my src/sys which contains the word "callout". Obviously, getting the API right, so that we will not have to walk all these files once again is a very important point, and the only one I am trying to focus on right now. That is why the proposed API is only the client side. How we implement the timeout service, one which cpus and in which threads we execute the the timeout functions, and all other questions of that sort are not addressed, because I doubt anybody has a definitive answer to those questions yet. But if we get the API right, so that it can express the request from the client code precisely and concisely, then we can start to play with, benchmark and argue about how we execute timeouts. So please look at the proposed API only from the client side code for now. All the other questions are hidden behind the choice of first argument to timeout_init(). -- 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.