Date: Sun, 02 Dec 2007 08:46:48 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: phk@phk.freebsd.dk Cc: arch@freebsd.org Subject: Re: New "timeout" api, to replace callout Message-ID: <20071202.084648.-108809549.imp@bsdimp.com> In-Reply-To: <15391.1196547545@critter.freebsd.dk> References: <15391.1196547545@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <15391.1196547545@critter.freebsd.dk> Poul-Henning Kamp <phk@phk.freebsd.dk> writes: : Here is my proposed new timeout API for 8.x. : : The primary objective is to make it possible to have multiple timeout : "providers" of possibly different kind, so that we can have per-cpu : or per-net-stack timeout handing. : : A secondary goal, is to shove the anti-race handling in destruction of : timeouts back into the implemenation, rather than force users to spend : 20+ lines doing that. : : A third goal is to enable deadline scheduling of timeouts using hardware : like HPET when and where we have it. : : Comments in general (only B/W) and pointers to client code of : particular interest is most welcome. >>/* >> * A duration of time, represented in the optimal way for a given provider >> * or family of providers (ie: per cpu). >> */ >>typedef int timeout_time; What does this mean? How do I get one of those? Without a unit associated with this number, it becomes hard to do a "tickless" implementation. Right now we have a well defined unit (1/hz). I worry that without having a way to convert time to this thing that we'll have more trouble writing drivers. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071202.084648.-108809549.imp>