Re: a proposed callout API



On Wed, 29 Nov 2006 10:21:47 +0000
"Poul-Henning Kamp" <phk@xxxxxxxxxxxxxx> 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."
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: a proposed callout API
    ... with a negative value indicating a relative timeout (so an 'uptime' ... i.e. trigger X us from now) and a positive value indicating an ... 1- the critical path deals with a single word, ...
    (freebsd-arch)
  • Re: a proposed callout API
    ... with a negative value indicating a relative timeout (so an 'uptime' ... i.e. trigger X us from now) and a positive value indicating an ... The bits _will_ go in the flags argument I proposed. ...
    (freebsd-arch)
  • Re: Question about howto do proper timeout checking on connections
    ... > Setsockopt returns zero, indicating that the so_rcvtimeo was ... I used a timeout of 2500 ms to test this. ... Each time data is received or sent on a socket, ...
    (microsoft.public.win32.programmer.networks)
  • Re: timeout on url requests?
    ... @"http://www.SomeWebSite.com/";] encoding: NSASCIIStringEncoding error: nil]]; ... You can make a NSURLRequest with a NSURL and set the timeout time. ...
    (comp.sys.mac.programmer.help)