New "timeout" api, to replace callout

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Dec 2 03:01:20 PST 2007


In message <20071202103833.N74097 at 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 at 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.


More information about the freebsd-arch mailing list