Date: Wed, 29 Nov 2006 14:10:27 -0200 From: Ricardo Nabinger Sanchez <rnsanchez@wait4.org> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: freebsd-arch@freebsd.org Subject: Re: a proposed callout API Message-ID: <20061129141027.5bd71945.rnsanchez@wait4.org> In-Reply-To: <8092.1164795707@critter.freebsd.dk> References: <20061128231010.cbdc4e1d.rnsanchez@wait4.org> <8092.1164795707@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Nov 2006 10:21:47 +0000 "Poul-Henning Kamp" <phk@phk.freebsd.dk> wrote: > >> I had intended on using microseconds > >> with a negative value indicating a relative timeout (so an 'uptime' > >> timeout, i.e. trigger X us from now) and a positive value indicating an > >> absolute timeout (time_t-ish, and subject to ntp changes). > > > >Just some devil's advocate thoughts... > > > >What are the advantages of encoding some semantic in one or two bits of the > >argument, instead of passing another word with flags? > > The bits _will_ go in the flags argument I proposed. Yes, I recall from your first message about the proposed API. What confused me was that John explained a +useconds/-useconds encoding, and this microsecond bounding is what concerned me. It seems to me that it's too tight, given that 10G-E can get popular soon (5 or less years). If I understood your (phk) proposal, it is tick-ready---which I think is the natural way to go in order to handle high precision events. My concern is that microsecond resolution (if I understood John's proposal correctly) may seem right for now, but what about in 5 years? Promoting it to nanoseconds (also using 64-bit word) seems likely to happen, with some breakage. Also, regarding your encoding proposal, I think my argumentation in the previous message isn't valid, as the bit is used to determine the scale of the timeout in the remaining bits. It looks fine to me, as both tick-resolution and second-resolution (or longer) events are representable, probably being applicaple for a good time (I don't have any idea of how much time, but feel like it's a lot). -- Ricardo Nabinger Sanchez <rnsanchez@{gmail.com,wait4.org}> Powered by FreeBSD "Left to themselves, things tend to go from bad to worse."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061129141027.5bd71945.rnsanchez>