a proposed callout API

Colin Percival cperciva at freebsd.org
Mon Nov 13 21:43:35 UTC 2006


Poul-Henning Kamp wrote:
> XXX_arm(struct xxx*, tick_t, func *, arg *, int flag, struct mtx *);
> 	Arm timer.

If we (meaning you) are going to redesign the callout code, I think it
would be great if the API provided some mechanism for specifying the
required callback accuracy; for example "I'd like to be called back no
later than 3 seconds from now, but any time after 2 seconds would be
fine".

This would allow more callbacks to be performed during each wakeup of
the softclock thread, thereby amortizing the context switch overhead
and increasing the average time when an otherwise idle cpu can sleep.

Colin Percival


More information about the freebsd-arch mailing list