From owner-freebsd-arch@FreeBSD.ORG Sat Nov 10 14:12:20 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB39216A418; Sat, 10 Nov 2007 14:12:20 +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 A3E4313C4A8; Sat, 10 Nov 2007 14:12:20 +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 3116517105; Sat, 10 Nov 2007 14:12:08 +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 lAAEC7Wk064646; Sat, 10 Nov 2007 14:12:07 GMT (envelope-from phk@critter.freebsd.dk) To: "Attilio Rao" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 10 Nov 2007 15:05:02 +0100." <3bbf2fe10711100605h6b12238au7cc9d0fc6d1afde@mail.gmail.com> Date: Sat, 10 Nov 2007 14:12:07 +0000 Message-ID: <64645.1194703927@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-arch@freebsd.org Subject: Re: [RFC] callout overhaul: part I 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: Sat, 10 Nov 2007 14:12:21 -0000 In message <3bbf2fe10711100605h6b12238au7cc9d0fc6d1afde@mail.gmail.com>, "Attil io Rao" writes: >> 2. About XXX_instances >> ----------------------- >> >> You propose a XXX_arm() and a XXX_arm_cpu(). That is a pointless >> limitation. >> >> My API proposal said specifically: >> >> > The functions above will actually be wrappers for a more generic >> > set of the same family, which also takes a pointer to a callout-group. >> >> And I guess the meaning of this was too subtle, so I will elaborate: >> >> The fundamental function will be called >> >> XXX_arm_cg(struct xxx_group *cg, ...) >> >> The xxx_group argument can be NULL, in which case a group is >> chosen for you by unspecified means. > >Is this group, in your idea, sorta of a node of the heap you >previously discussed in the thread? It is the handle for the handler you want to use, whatever that is and however it is implemented. The binary heap will be one member of that struct I pressume, if the implementation does use a binary heap in the first place. Our first implementation would likely use the existing callout mechanism, so that the API conversion can be decoupled from the implementation of the new and smarter techniques. -- 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.