callout patch - make callouts per-cpu and MP safe.
Matthew Dillon
dillon at apollo.backplane.com
Tue Sep 14 10:29:26 PDT 2004
:I'm asking because I don't think the callout_reset arguments which specify
:the target function and argument over and over again are the normal usage
:case. I'm not 100% sure of all uses, but e.g. for the NICs the arguments
:are always static.
:
:Have a look at OpenBSD's sys/timeout.h, they have timeout_set,
:timeout_add and timeout_del.
:
:timeout_set gets the function and data parameter, timeout_add only the
:wanted delay. It's simpler to use because you don't have to worry about
:thos two all over the place.
:
:Both provide the same functionality and could be implemented in parallel,
:sure. But we could avoid having to change the existing API and could
:convert them on a case-by-case base.
:
:Joerg
Well, callout_reset() is the only way to start a new timeout using
the 'new' API in FreeBSD/DragonFly.
I like the OpenBSD method better (as you describe it), but it would
be a considerable amount of work to change our APIs.
If you want to change over to the OpenBSD API I would first say that
we should get rid of the 'old' API (timeout() / untimeout()). Once
we get rid of the 'old' API we can shift the 'new' API over to a
'newer then new' OpenBSD API :-)
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Kernel
mailing list