From owner-freebsd-arch Tue Jan 14 1:47:52 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BCBD37B401 for ; Tue, 14 Jan 2003 01:47:51 -0800 (PST) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C75D43F5B for ; Tue, 14 Jan 2003 01:47:49 -0800 (PST) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id h0E9lZQB095344; Tue, 14 Jan 2003 12:47:35 +0300 (MSK) Date: Tue, 14 Jan 2003 12:47:35 +0300 (MSK) From: Igor Sysoev X-Sender: is@is To: Matthew Dillon Cc: arch@FreeBSD.ORG Subject: Re: getsysfd() patch #1 (Re: Virtual memory question) In-Reply-To: <200301140851.h0E8p78U078882@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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