Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2003 12:47:35 +0300 (MSK)
From:      Igor Sysoev <is@rambler-co.ru>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        arch@FreeBSD.ORG
Subject:   Re: getsysfd() patch #1 (Re: Virtual memory question)
Message-ID:  <Pine.BSF.4.21.0301141233180.26727-100000@is>
In-Reply-To: <200301140851.h0E8p78U078882@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 14 Jan 2003, Matthew Dillon wrote:

>     Another thing I would like to do is descriptor-based timers.  So instead
>     of being limited to just the stupid itimers, or interfering with other
>     threads/libraries use of [i]timers, you can simply allocate your own by
>     getting a timer descriptor and then doing cool things with it, like
>     having it generate a custom signal or selecting on it or kqueue'ing on
>     it etc...  it's something UNIX has needed for a long time actually.

kqueue already has EVFILT_TIMER in __FreeBSD_version >= 440001 and
__FreeBSD_version >= 500023. Descriptor-based timers would be non-standard
feature and if you use non-standard features then you should use kqueue
instead of poll or select.

Nevetheless it seems to me that using many kernel timers is not good
thing if you need frequently to set or delete them (i.e. in web-servers).
It's much better to use user-level timer queue and call
kqueue/poll/select with timeout value from the head of this queue.


Igor Sysoev
http://sysoev.ru/en/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0301141233180.26727-100000>